# CVE-2019-3826: Cross-site scripting in prometheus

> An attacker can execute arbitrary scripts in a victim's browser by tricking an authenticated user into visiting a crafted URL on a Prometheus server.

- **Severity:** Medium 6.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 26 Mar 2019
- **Updated:** 4 Aug 2024
- **Also known as:** DEBIAN-CVE-2019-3826, UBUNTU-CVE-2019-3826

## What is CVE-2019-3826?

CVE-2019-3826 is a medium-severity cross-site scripting vulnerability in Redhat Openshift Container Platform, published on 26 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A stored, DOM based, cross-site scripting (XSS) flaw was found in Prometheus before version 2.7.1. An attacker could exploit this by convincing an authenticated user to visit a crafted URL on a Prometheus server, allowing for the execution and persistent storage of arbitrary scripts.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2019-3826?

It affects 2 products.


Products: Prometheus Prometheus, Redhat Openshift Container Platform.

## How do I fix CVE-2019-3826?

Upgrade to a fixed version.

## Is CVE-2019-3826 being exploited?

There is no known exploitation of CVE-2019-3826 in the wild and no public exploit code.

## Other vulnerabilities in Redhat Openshift Container Platform

- [CVE-2026-42151](https://insights.sbomify.com/CVE-2026-42151/): Prometheus Azure AD remote write OAuth client secret exposed via config API (high 7.5)
- [CVE-2026-42154](https://insights.sbomify.com/CVE-2026-42154/): Prometheus: remote read endpoint allows denial of service via crafted snappy payload (high 7.5)
- [CVE-2021-29622](https://insights.sbomify.com/CVE-2021-29622/): Arbitrary redirects under /new endpoint (medium 6.5)
- [CVE-2026-40179](https://insights.sbomify.com/CVE-2026-40179/): Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer (medium 5.3)
- [CVE-2026-44903](https://insights.sbomify.com/CVE-2026-44903/): Prometheus: Stored XSS via crafted histogram bucket label values in the heatmap display of the old Prometheus web UI (medium 5.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-3826 and fix it if it is affected.

What it is: CVE-2019-3826 is a medium-severity cross-site scripting vulnerability in Redhat Openshift Container Platform, published on 26 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-3826 in the wild and no public exploit code.

Affected product: Redhat Openshift Container Platform. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-3826/ (Markdown: https://insights.sbomify.com/CVE-2019-3826/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-3826
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-3826
- OSV: https://osv.dev/vulnerability/CVE-2019-3826

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-3826/
Summaries are generated and may contain mistakes; the official description above is the record.
