CVE-2026-42154: Prometheus: Remote read endpoint allows denial of service via crafted snappy payload
Impact The remote read endpoint (/api/v1/read) does not validate the declared decoded length in a snappy-compressed request body before allocating memory. An unauthenticated attacker can send a small payload that causes a huge heap allocation per request. Under concurrent load this can exhaust available memory and crash the Prometheus process.
Published May 5, 2026 · Updated Jun 8, 2026
Affected packages
github.com/prometheus/prometheus
- Ecosystem
- Go
- Affected
- >= 0.306.0, < 0.311.3
- Fixed in
- 0.311.3
- Check
go list -m github.com/prometheus/prometheus
github.com/prometheus/prometheus
- Ecosystem
- Go
- Affected
- < 0.305.2
- Fixed in
- 0.305.2
- Check
go list -m github.com/prometheus/prometheus
github.com/prometheus/prometheus
- Ecosystem
- Go
- Affected
- >= 1.0.0-rc.0, <= 2.5.0
- Fixed in
- No patched version yet
- Check
go list -m github.com/prometheus/prometheus
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
The remote read endpoint (/api/v1/read) does not validate the declared decoded length in a snappy-compressed request body before allocating memory. An unauthenticated attacker can send a small payload that causes a huge heap allocation per request. Under concurrent load this can exhaust available memory and crash the Prometheus process.
Patches
_Has the problem been patched? What versions should users upgrade to?_
Fixed in 3.11.3 and 3.5.3 LTS. Users should upgrade to these versions or later.
Workarounds
User who can not upgrade can place Prometheus behind a reverse proxy or firewall that requires authentication before requests reach /api/v1/read.
Credited to ShadowByte1, Ankush-Pathak, noren95.
References
- https://github.com/prometheus/prometheus/security/advisories/GHSA-8rm2-7qqf-34qm
- https://nvd.nist.gov/vuln/detail/CVE-2026-42154
- https://github.com/prometheus/prometheus/pull/18584
- https://github.com/prometheus/prometheus/pull/18585
- https://github.com/prometheus/prometheus/releases/tag/v3.11.3
- https://github.com/prometheus/prometheus/releases/tag/v3.5.3
- https://github.com/advisories/GHSA-8rm2-7qqf-34qm
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-42151
Prometheus Azure AD remote write OAuth client secret exposed via config API
high7.5May 5, 2026CVE-2026-44903
Prometheus vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display
medium6.1May 5, 2026CVE-2026-40179
Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer
medium6.1Apr 13, 2026
