Renovate: Update module github.com/prometheus/prometheus to v0.311.2 [SECURITY] - abandoned#322
Conversation
|
|
@trouaux Do you want to take a look at this? As far as I can see, this can only be resolved by upgrading k8s.io/* dependencies, which I don't have experience with. |
init Parse for new go prometheus version + go get github.com/go-openapi/swag@v0.26.0
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
go mod tidy @majewsky does this makes sense? |
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
Sorry, I was out last week. Please do proceed on your own volition. |
This PR contains the following updates:
v0.306.0→v0.311.2Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer
BIT-prometheus-2026-40179 / CVE-2026-40179 / GHSA-vffh-x6r8-xx99
More information
Details
Impact
Stored cross-site scripting (XSS) via crafted metric names in the Prometheus web UI:
innerHTMLwithout escaping, causing arbitrary script execution in the user's browser.innerHTMLwithout escaping, causing arbitrary script execution in the user's browser.lelabel values of the underlying histogram buckets are interpolated intoinnerHTMLwithout escaping. Whileleis conventionally a numeric bucket boundary, Prometheus does not enforce this — arbitrary UTF-8 strings are accepted as label values, allowing script injection via a crafted scrape target or remote write.With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like
<,>, and"are now valid in metric names and labels, making this exploitable.An attacker who can inject metrics (via a compromised scrape target, remote write, or OTLP receiver endpoint) can execute JavaScript in the browser of any Prometheus user who views the metric in the Graph UI. From the XSS context, an attacker could for example:
/api/v1/status/configto extract sensitive configuration (although credentials / secrets are redacted by the server)/-/quitto shut down Prometheus (only if--web.enable-lifecycleis set)/api/v1/admin/tsdb/delete_seriesto delete data (only if--web.enable-admin-apiis set)Both the new Mantine UI and the old React UI are affected. The vulnerable code paths are:
web/ui/mantine-ui/src/pages/query/uPlotChartHelpers.ts— tooltipinnerHTMLwith unescapedlabels.__name__web/ui/react-app/src/pages/graph/GraphHelpers.ts— tooltip content with unescapedlabels.__name__web/ui/react-app/src/pages/graph/MetricsExplorer.tsx— fuzzy search results rendered viadangerouslySetInnerHTMLwithout sanitizationweb/ui/react-app/src/vendor/flot/jquery.flot.heatmap.js— heatmap tooltip with unescaped label valuesPatches
A patch has been published in Prometheus 3.5.2 LTS and Prometheus 3.11.2. The fix applies
escapeHTML()to all user-controlled values (metric names and label values) before inserting them intoinnerHTML. This advisory will be updated with the patched version once released.Workarounds
--web.enable-remote-write-receiver), ensure it is not exposed to untrusted sources.--web.enable-otlp-receiver), ensure it is not exposed to untrusted sources.--web.enable-admin-apiorweb.enable-lifecycle) in cases where you cannot prevent untrusted data from being ingested.Acknowledgements
Thanks to @gladiator9797 (Duc Anh Nguyen from TinyxLab) for reporting this.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
prometheus/prometheus (github.com/prometheus/prometheus)
v0.311.2Compare Source
v0.311.1Compare Source
v0.311.0Compare Source
v0.310.0Compare Source
v0.309.1Compare Source
v0.309.0Compare Source
v0.308.1Compare Source
v0.308.0Compare Source
v0.307.3Compare Source
v0.307.2Compare Source
v0.307.1Compare Source
v0.307.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.