{"answers":{"affected":"8 open source packages ship an affected version, including github.com/prometheus/prometheus and prometheus. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-40179 in the wild and no public exploit code.","fix":"Upgrade github.com/prometheus/prometheus to a fixed version for your release line: 0.311.2-0.20260410083055-07c6232d159b, 3.5.2 or 3.11.2.","what":"CVE-2026-40179 is a medium-severity cross-site scripting vulnerability in prometheus, published on 15 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-40179 and fix it if it is affected.\n\nWhat it is: CVE-2026-40179 is a medium-severity cross-site scripting vulnerability in prometheus, published on 15 Apr 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-40179 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/prometheus/prometheus (Go): affected all versions; fixed in 0.311.2-0.20260410083055-07c6232d159b\n- github.com/prometheus/prometheus (Go): affected all versions; fixed in 0.311.2-0.20260410083055-07c6232d159b\n- github.com/prometheus/prometheus (Go): affected all versions; fixed in 0.311.2-0.20260410083055-07c6232d159b\n- github.com/prometheus/prometheus (Go): affected from 3.0.0; fixed in 3.5.2\n- github.com/prometheus/prometheus (Go): affected from 3.0.0; fixed in 3.5.2\n- github.com/prometheus/prometheus (Go): affected from 3.6.0; fixed in 3.11.2\n- github.com/prometheus/prometheus (Go): affected from 3.6.0; fixed in 3.11.2\n- prometheus (Bitnami): affected all versions; fixed in 0.305.2, 0.311.2, 3.5.2, 3.11.2\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-40179/ (Markdown: https://insights.sbomify.com/CVE-2026-40179/index.md)","id":"CVE-2026-40179","markdown":"https://insights.sbomify.com/CVE-2026-40179/index.md","name":"CVE-2026-40179","record":{"aliases":["BIT-prometheus-2026-40179","CLEANSTART-2026-FB95411","CLEANSTART-2026-IU00943","CLEANSTART-2026-KZ65595","CLEANSTART-2026-PM96717","CLEANSTART-2026-PN08299","CLEANSTART-2026-WT48121","CLEANSTART-2026-ZN75332","ECHO-8867-5968-3e38","GHSA-vffh-x6r8-xx99","GO-2026-5662","MINI-26m5-2c9v-4hhg","MINI-28gg-m7jc-jvqf","MINI-2gg2-j3v9-w82c","MINI-2qpg-f588-6hj7","MINI-2rw8-p347-p4m2","MINI-3268-279r-5f6q","MINI-336q-gwfc-4j8f","MINI-395r-xx6p-37g9","MINI-3fpg-f5m4-xjpw","MINI-3m3w-7wq6-7pr7","MINI-3vq8-mj59-mf68","MINI-3xwj-pwpp-7gw8","MINI-43r2-m8hw-xpxf","MINI-494q-5q32-8xpj","MINI-4mxh-fm5f-p36f","MINI-53v4-89wx-5mfp","MINI-5g8w-7wcm-c9xr","MINI-5rg6-f788-768q","MINI-5xcm-9gvc-3mw9","MINI-5xg6-h44h-48q3","MINI-644x-j325-pj5j","MINI-6hvh-r373-4f69","MINI-6qvc-p89q-75wr","MINI-723r-75m9-8jw5","MINI-75cc-cxgx-8xh4","MINI-7r72-4qjr-ggfr","MINI-7r9w-624p-795c","MINI-7v5p-fv2w-x5jc","MINI-7vgh-pj53-8q9g","MINI-7xvc-vx3j-hvx6","MINI-82hv-q3qg-vm9r","MINI-8467-rmw5-6p3w","MINI-87m4-mq7c-57pf","MINI-8j8r-x772-vc6q","MINI-8vcm-vgjg-c2m9","MINI-93qf-f7cv-h48j","MINI-9622-rc8h-jqrh","MINI-96m6-53wj-473c","MINI-975v-g53p-r33r","MINI-97pw-c52p-r428","MINI-9hh8-c5v9-cc49","MINI-9jfx-42xw-gqj6","MINI-9jjw-fvmm-27pc","MINI-9px8-w897-jv23","MINI-9pxx-f3w8-5qp5","MINI-c4f8-p29p-qwcr","MINI-c5hg-wj89-prp8","MINI-cfc9-64f9-vmjr","MINI-ch29-8rr8-9g4j","MINI-cm8r-hrj4-gpf6","MINI-cmm7-w2rh-7gqh","MINI-cmmw-4r52-25v7","MINI-cw72-68q2-pfh8","MINI-f7rx-m55m-j6c8","MINI-f8r8-m946-23p8","MINI-f9f4-w4g7-346v","MINI-fjqq-rwwh-g835","MINI-fqmf-f2vp-pm27","MINI-fr26-v265-8hj5","MINI-fvf3-m47v-6g83","MINI-fw64-52r6-7v58","MINI-g5vr-fxqw-3494","MINI-g8pw-72m7-r37q","MINI-gc3m-m32h-mc83","MINI-gp34-c9mp-678r","MINI-gq79-qfv6-3g2v","MINI-h3cw-fg56-gcm3","MINI-h476-mcj5-7xx6","MINI-hhjv-3qw2-4x54","MINI-hq72-cfvq-36g9","MINI-hq7h-2rc8-gxwf","MINI-hvm8-xhp8-5h82","MINI-hwh9-rpcj-j6vw","MINI-jcrf-7w2f-xw2r","MINI-jp23-fhc8-rhq5","MINI-jvc4-wxqc-m4c5","MINI-jvm9-9w76-4cw5","MINI-jw64-wf2q-h5qq","MINI-m246-x42p-4qh6","MINI-m2f4-ghj8-9hfm","MINI-m3r5-2gfj-jrp6","MINI-mf5f-cwgw-rgvw","MINI-mg35-8fpj-g3pf","MINI-mgpm-86p6-mw3f","MINI-mq6v-r49m-658x","MINI-mv3j-8gv6-2xj4","MINI-mv9x-gvgh-q887","MINI-p339-m57h-hr4g","MINI-p5xj-2473-w7jq","MINI-pcmh-h7g2-xfmm","MINI-phgw-4734-9fgh","MINI-pjxg-w799-x9w6","MINI-pmm2-28r6-w7jr","MINI-q676-wj52-8v8r","MINI-q7jr-jfpj-x2ch","MINI-qg7g-c34r-7vc6","MINI-qhp9-223m-82hm","MINI-qwh7-fpxh-63g2","MINI-r2rv-8w94-jj96","MINI-r4hr-55hg-25qg","MINI-r773-2xf3-xjj5","MINI-r7ww-g2vw-xg2c","MINI-r8jm-p4m2-8m96","MINI-rc3p-98c8-g5c5","MINI-rhq7-37v2-cjmw","MINI-rp66-xwq3-76gc","MINI-rq2p-2wr3-vh74","MINI-v2c4-frxm-g7w9","MINI-v5xh-5cj2-c674","MINI-vhq9-f488-9h6x","MINI-vj7p-v9qj-27qf","MINI-vrg4-28f4-5c9c","MINI-w7hg-5cg7-jhgh","MINI-wj92-xwhh-wj33","MINI-wq37-pqcj-cr36","MINI-wrx4-95gj-63jg","MINI-wx37-rr4c-qpm3","MINI-x4jm-j55m-wp3h","MINI-xphc-gvrh-jj76","MINI-xr5m-3833-xvxq","ROOT-APP-GOBINARY-CVE-2026-40179","UBUNTU-CVE-2026-40179","openSUSE-SU-2026:10607-1"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Prometheus monitoring system","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in Prometheus web UI via unsanitized metric names, potentially leading to data exfiltration or system shutdown.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"prometheus","vendor":"prometheus"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"Prometheus is an open-source monitoring system and time series database. Versions 3.0 through 3.5.1 and 3.6.0 through 3.11.1 have stored cross-site scripting vulnerabilities in multiple components of the Prometheus web UI where metric names and label values are injected into innerHTML without escaping. In both the Mantine UI and old React UI, chart tooltips on the Graph page render metric names containing HTML/JavaScript without sanitization. In the old React UI, the Metric Explorer fuzzy search results use dangerouslySetInnerHTML without escaping, and heatmap cell tooltips interpolate le label values without sanitization. With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like \u003c, \u003e, and \" are now valid in metric names and labels. An attacker who can inject metrics via a compromised scrape target, remote write, or OTLP receiver endpoint can execute arbitrary JavaScript in the browser of any Prometheus user who views the metric in the Graph UI, potentially enabling configuration exfiltration, data deletion, or Prometheus shutdown depending on enabled flags. This issue has been fixed in versions 3.5.2 and 3.11.2. If developers are unable to immediately update, the following workarounds are recommended: ensure that the remote write receiver (--web.enable-remote-write-receiver) and the OTLP receiver (--web.enable-otlp-receiver) are not exposed to untrusted sources; verify that all scrape targets are trusted and not under attacker control; avoid enabling admin or mutating API endpoints (e.g., --web.enable-admin-api or --web.enable-lifecycle) in environments where untrusted data may be ingested; and refrain from clicking untrusted links, particularly those containing functions such as label_replace, as they may generate poisoned label names and values.","ecosystems":["Bitnami","Go","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2026-08-19","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-08-19T08:43:08Z","kind":"github_poc","ref":"https://github.com/bsdrip/CVE-2026-40179-PoC","stars":1,"title":"A minimal, dependency-light proof of concept for CVE-2026-40179 (GHSA-vffh-x6r8-xx99): stored cross-site scripting in the Prometheus web UI, delivered through an unauthenticated remote_write endpoint."}],"tier":"poc_unverified"},"has_fix":true,"headline":"Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer","id":"CVE-2026-40179","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":9,"n_references":3,"next":{"headline":"Zip Slip Path Traversal in quarkus-openapi-generator ApicurioCodegenWrapper class","id":"CVE-2026-40180"},"packages":[{"ecosystem":"Bitnami","fixed":["0.305.2","0.311.2","3.5.2","3.11.2"],"introduced":["0","0.306.0","1.0.0","3.6.0"],"last_affected":[],"package":"prometheus","purl":"pkg:bitnami/prometheus","source":"BIT-prometheus-2026-40179"},{"ecosystem":"Go","fixed":["0.311.2-0.20260410083055-07c6232d159b"],"introduced":["0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":null,"source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"Go","fixed":["0.311.2-0.20260410083055-07c6232d159b"],"introduced":["0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":"pkg:golang/github.com/prometheus/prometheus","source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"Go","fixed":["0.311.2-0.20260410083055-07c6232d159b"],"introduced":["0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":"pkg:golang/github.com/prometheus/prometheus","source":"GO-2026-5662"},{"ecosystem":"Go","fixed":["3.5.2"],"introduced":["3.0.0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":null,"source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"Go","fixed":["3.5.2"],"introduced":["3.0.0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":"pkg:golang/github.com/prometheus/prometheus","source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"Go","fixed":["3.11.2"],"introduced":["3.6.0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":null,"source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"Go","fixed":["3.11.2"],"introduced":["3.6.0"],"last_affected":[],"package":"github.com/prometheus/prometheus","purl":"pkg:golang/github.com/prometheus/prometheus","source":"GHSA-vffh-x6r8-xx99"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.11.2-1.1"],"introduced":["0"],"last_affected":[],"package":"golang-github-prometheus-prometheus","purl":"pkg:rpm/opensuse/golang-github-prometheus-prometheus\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:10607-1"}],"prev":{"headline":"ajenti.plugin.core has a race conditions in 2FA","id":"CVE-2026-40178"},"products":["prometheus"],"published":"2026-04-15","related":[{"cvss_score":7.5,"headline":"Prometheus Azure AD remote write OAuth client secret exposed via config API","id":"CVE-2026-42151","kev_date_added":null,"published":"2026-05-04"},{"cvss_score":7.5,"headline":"Prometheus: remote read endpoint allows denial of service via crafted snappy payload","id":"CVE-2026-42154","kev_date_added":null,"published":"2026-05-04"},{"cvss_score":6.5,"headline":"Arbitrary redirects under /new endpoint","id":"CVE-2021-29622","kev_date_added":null,"published":"2021-05-19"},{"cvss_score":6.1,"headline":"Cross-site scripting in prometheus","id":"CVE-2019-3826","kev_date_added":null,"published":"2019-03-26"},{"cvss_score":5.1,"headline":"Prometheus: Stored XSS via crafted histogram bucket label values in the heatmap display of the old Prometheus web UI","id":"CVE-2026-44903","kev_date_added":null,"published":"2026-05-26"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-04-16","vendors":["prometheus"]},"summary":"Attackers can execute arbitrary JavaScript in Prometheus web UI via unsanitized metric names, potentially leading to data exfiltration or system shutdown.","url":"https://insights.sbomify.com/CVE-2026-40179/"}