CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-42154

CVE-2026-42154: Unauthenticated Denial of Service via Snappy Bomb in Prometheus Remote Read Endpoint

Alon Barad
Alon Barad
Software Engineer

May 5, 2026·6 min read·126 visits

Executive Summary (TL;DR)

An unauthenticated remote attacker can crash the Prometheus server by sending a minimal, crafted Snappy payload to the remote read endpoint, triggering excessive memory allocation and an immediate Out-of-Memory (OOM) condition.

Prometheus versions prior to 3.5.3 and 3.6.0 through 3.11.2 are vulnerable to a Denial of Service (DoS) attack. The `/api/v1/read` endpoint improperly handles compressed request bodies, allowing an unauthenticated attacker to exhaust server memory using a crafted Snappy payload. This memory exhaustion causes the underlying process to terminate, rendering the monitoring infrastructure completely unavailable.

Vulnerability Overview

Prometheus exposes the /api/v1/read endpoint to facilitate remote read operations, allowing external clients to query time-series data. This endpoint accepts HTTP POST requests containing payload data compressed with the Snappy algorithm. The system relies on the snappy-go library to decompress incoming streams before parsing the underlying query protocol.

The vulnerability, tracked as CVE-2026-42154, constitutes an uncontrolled resource consumption flaw (CWE-400) and memory allocation with excessive size value (CWE-789). It arises because the endpoint does not validate the uncompressed size declared in the Snappy stream header before initiating the decompression process.

By transmitting a specifically constructed payload, an unauthenticated attacker can force the Prometheus server to allocate large amounts of heap memory. This behavior directly leads to memory exhaustion. The operating system OOM killer subsequently terminates the Prometheus process, resulting in a complete denial of service.

Root Cause Analysis

The root cause resides in the DecodeReadRequest function within storage/remote/codec.go. When processing incoming requests, the application directly invokes snappy.Decode(nil, compressed) on the HTTP request body.

The Snappy compression format encodes the expected decompressed data size as a varint (variable-length integer) at the very beginning of the stream. The Go implementation of the Snappy decoder reads this varint and immediately allocates a destination byte slice of that exact capacity to hold the uncompressed data.

The flaw occurs because the application performs no bounds checking on this decoded length value prior to the allocation step. A stream header can declare a multi-gigabyte decompressed size while the actual compressed payload is only a few bytes long. The Go runtime obediently attempts to provision the requested memory, leading to an immediate spike in memory consumption.

Code Analysis

The vulnerable implementation simply passes the raw byte slice to the decoding function. The absence of a safety check means the snappy-go library dictates the allocation behavior based entirely on untrusted user input.

The following code illustrates the relevant modifications introduced in the patch. The developers implemented a validation step utilizing snappy.DecodedLen to read the varint header without allocating the memory required for the full decompression.

// Vulnerable Implementation
// reqBuf, err := snappy.Decode(nil, compressed)
 
// Patched Implementation
decodedLen, err := snappy.DecodedLen(compressed)
if err != nil {
    return nil, err
}
 
// decodeReadLimit is established at 32 MiB (33,554,432 bytes)
if decodedLen > decodeReadLimit {
    return nil, fmt.Errorf("snappy: decoded length %d exceeds limit %d", decodedLen, decodeReadLimit)
}
 
reqBuf, err := snappy.Decode(nil, compressed)

This fix is complete for this specific endpoint. By enforcing a hard limit of 32 MiB on the expected decompressed size, the application prevents arbitrary heap allocations. Requests exceeding this threshold are rejected synchronously before any substantial memory is requested from the runtime.

Exploitation & Attack Flow

Exploitation requires network access to the Prometheus /api/v1/read endpoint. No authentication is necessary, lowering the barrier to entry for prospective attackers. The attack vector relies on generating a "Snappy Bomb," a highly compressed data structure designed to trigger the allocation flaw.

An attacker constructs a minimal byte sequence representing a valid Snappy stream header. For instance, a 5-byte sequence 0x80 0x80 0x80 0x80 0x01 decodes to a varint representing 268,435,456 bytes (256 MiB). The attacker packages this header into an HTTP POST request and transmits it to the target endpoint.

// Proof of Concept logic simulating the attack
bomb := []byte{0x80, 0x80, 0x80, 0x80, 0x01}
req, err := http.NewRequest(http.MethodPost, "/api/v1/read", bytes.NewReader(bomb))

A single request consumes 256 MiB of memory. By issuing multiple concurrent requests, the attacker compounds the memory allocations rapidly. A simple script can easily exhaust the physical memory of a standard server within seconds, triggering a swift denial of service.

Exploitation Architecture

The following diagram illustrates the sequence of events during a successful exploitation attempt. It details the flow from the initial malicious request to the eventual process termination by the operating system.

The process highlights the critical failure point at the boundary between the application logic and the compression library. The application trusts the compression library to handle the stream safely, while the library trusts the stream header to represent legitimate data requirements.

Impact Assessment

The primary impact of CVE-2026-42154 is a severe reduction in availability. Prometheus operates as a critical infrastructure component used for monitoring and alerting. Disabling the monitoring system blinds operations teams to other potential ongoing issues or concurrent attacks within the monitored environment.

The vulnerability carries a CVSS v3.1 base score of 7.5. The attack complexity is low, and no user interaction is required. The exploit is reliable and leaves minimal traces in standard access logs beyond an influx of POST requests to the remote read endpoint.

Confidentiality and integrity remain unaffected. The attacker cannot extract metric data, modify stored time-series information, or execute arbitrary code. The damage is restricted entirely to resource exhaustion and forced process termination.

Remediation

The most effective remediation strategy is to upgrade Prometheus to a patched release. Administrators must deploy version 3.5.3 or 3.11.3, which contain the upstream fixes limiting the decompressed buffer allocation to 32 MiB.

If immediate patching is not feasible, network-level mitigations reduce the attack surface. Administrators should restrict access to the /api/v1/read endpoint using firewalls, reverse proxies, or API gateways. Only trusted components and authorized IP addresses should be permitted to interact with the remote read functionality.

Implementing a Web Application Firewall (WAF) rule to block POST requests to /api/v1/read entirely serves as a temporary workaround if the remote read feature is not actively utilized. Additionally, configuring strict memory limits via container orchestration platforms ensures that a Prometheus crash does not affect co-located services on the same node.

Official Patches

Prometheus ProjectFix PR for v3.5.x branch
Prometheus ProjectFix PR for Main/v3.11.x branch
Prometheus ProjectOfficial Security Advisory

Technical Appendix

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

Affected Systems

Prometheus Core ServerPrometheus Remote Read API

Affected Versions Detail

Product
Affected Versions
Fixed Version
Prometheus
Prometheus Project
< 3.5.33.5.3
Prometheus
Prometheus Project
>= 3.6.0, < 3.11.33.11.3
AttributeDetail
CWE IDCWE-400, CWE-789
Attack VectorNetwork
CVSS v3.1 Score7.5 (High)
ImpactDenial of Service (Memory Exhaustion / OOM)
Exploit StatusProof of Concept (PoC) available
AuthenticationNone required

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-400
Uncontrolled Resource Consumption

Uncontrolled Resource Consumption and Memory Allocation with Excessive Size Value

Known Exploits & Detection

Official Prometheus Test SuiteProof of Concept logic added as a regression test in the fix PR.

Vulnerability Timeline

CVE-2026-42154 published and GitHub Advisory GHSA-8rm2-7qqf-34qm disclosed
2026-05-04
Patches merged into Prometheus repository (Pull Requests #18584 and #18585)
2026-05-04
Versions 3.5.3 and 3.11.3 released
2026-05-04

References & Sources

  • [1]GitHub Security Advisory GHSA-8rm2-7qqf-34qm
  • [2]Prometheus Pull Request #18584
  • [3]Prometheus Pull Request #18585
  • [4]NVD CVE-2026-42154
  • [5]CWE-400: Uncontrolled Resource Consumption
  • [6]CWE-789: Memory Allocation with Excessive Size Value
  • [7]MITRE ATT&CK T1499: Endpoint Denial of Service

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 20 hours ago•GHSA-H5X8-XP6M-X6Q4
7.1

GHSA-H5X8-XP6M-X6Q4: Unvalidated Signature Generation in @jhb.software/payload-cloudinary-plugin

The @jhb.software/payload-cloudinary-plugin exposes an endpoint that performs unvalidated cryptographic signing of Cloudinary API parameters, allowing authenticated users with minimal privileges to forge valid signatures for arbitrary actions. This flaw allows attackers to overwrite remote storage assets, execute unauthorized file uploads, alter asset visibility parameters, trigger SSRF webhooks, and perform directory traversal within Cloudinary repositories.

Alon Barad
Alon Barad
3 views•6 min read
•about 20 hours ago•GHSA-G2GW-Q38M-VJFC
8.7

GHSA-G2GW-Q38M-VJFC: Server-Side Request Forgery and Bearer Token Exfiltration in @merill/lokka

A Server-Side Request Forgery (SSRF) and Bearer Token Exfiltration vulnerability exists in the @merill/lokka (Lokka) Model Context Protocol (MCP) server prior to version 2.1.2. The server constructed Azure Resource Manager request URLs by concatenating user-controlled path parameters directly into destination request strings. By injecting authority-redefinition characters, an attacker can manipulate URL parsing to execute a host-escape attack, forcing the server to send high-privilege Azure Resource Manager (ARM) Bearer tokens to an external attacker-controlled host. This allows complete administrative access to the associated Azure subscriptions.

Alon Barad
Alon Barad
6 views•7 min read
•about 22 hours ago•GHSA-4XGF-CPJX-PC3J
5.3

GHSA-4xgf-cpjx-pc3j: Directory Traversal and Symlink Following in Pydantic Settings

A directory traversal and symlink following vulnerability exists in Pydantic Settings when using the NestedSecretsSettingsSource with nested subdirectory lookups enabled. An attacker capable of writing to the secrets directory can bypass size limitations, read arbitrary host files, or cause a denial-of-service condition via cyclic symlinks.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 23 hours ago•GHSA-H5RG-8P7F-47G2
4.1

GHSA-h5rg-8p7f-47g2: Server-Side Request Forgery (SSRF) in SurrealDB Identity & Access Management (IAM) JWKS Fetcher

A Server-Side Request Forgery (SSRF) vulnerability exists in SurrealDB's Identity & Access Management (IAM) module prior to version 3.1.5. When configuring JSON Web Key Set (JWKS) URLs for token verification, the remote fetcher follows HTTP redirects by default without validating redirect targets against configured network capabilities. This allows high-privileged users to bypass network access limits and perform blind port scanning of internal network resources.

Amit Schendel
Amit Schendel
4 views•6 min read
•1 day ago•GHSA-CC8F-FCX3-GPJR
7.7

GHSA-cc8f-fcx3-gpjr: Arbitrary File Disclosure via DEFINE ANALYZER mapper filter in SurrealDB

A local file disclosure vulnerability exists in SurrealDB's full-text search capabilities, allowing authenticated users with database EDITOR or OWNER roles to read arbitrary files from the host system filesystem. This occurs by abusing the mapper() filter inside a DEFINE ANALYZER statement to point to system files.

Alon Barad
Alon Barad
6 views•6 min read
•1 day ago•GHSA-H4H3-3RFJ-X6FQ
4.3

GHSA-H4H3-3RFJ-X6FQ: Value-Ordering Oracle Side-Channel via Indexed ORDER BY in SurrealDB

SurrealDB versions 3.0.0 through 3.1.4 contain an information exposure vulnerability (CWE-203) where the query planner optimizes sorted queries using indexes on fields with field-level SELECT restrictions. Because the query planner performs index-based sorting before enforcing permission-based redaction, unauthorized users can observe the physical order of returned rows to deduce the relative values of protected fields.

Alon Barad
Alon Barad
4 views•8 min read