OpenTelemetry Rust SDK, Unbounded Memory Allocation in W3C Baggage Propagation, CVE-2026-48504 (Medium) -DC-Jun2026-645

Listen to this Post

How CVE-2026-48504 Works

The vulnerability resides in the `BaggagePropagator::extract_with_context` function within the `opentelemetry_sdk` crate of the OpenTelemetry Rust implementation. This function is responsible for parsing inbound HTTP `baggage` headers, which are used to propagate key-value pairs across service calls in a distributed tracing context.
Prior to the patch, the extractor did not enforce the size limits recommended by the W3C Baggage specification before beginning the parsing process. Specifically, it failed to check the total byte size (recommended max of 8,192 bytes) and the maximum number of list-members (recommended max of 64 entries) on the inbound path. These limits were only enforced on the outbound (inject()) path, meaning that while the SDK would refuse to send an oversized baggage header, it would gladly receive and parse one.
An attacker can exploit this by crafting an HTTP request with an oversized `baggage` header. When the vulnerable `extract_with_context` function processes this header, it performs CPU-intensive work and makes numerous short-lived heap allocations proportional to the size of the attacker-controlled input. This parsing happens even though the SDK’s internal baggage storage limits would later discard the excess entries. The wasted effort on parsing data that is ultimately ignored creates a resource exhaustion opportunity, potentially leading to a denial-of-service (DoS) condition. The impact is strictly limited to availability; it does not expose, modify, or leak any telemetry data, nor does it allow for code execution.
The fix, implemented in version `0.32.1` of the opentelemetry_sdk, now applies the W3C limits directly during the extraction phase. It rejects any baggage header value larger than 8,192 bytes and limits extraction to the first 64 list-members, preventing the wasteful parsing of oversized payloads.

DailyCVE Form:

Platform: OpenTelemetry Rust SDK
Version: < 0.32.1
Vulnerability: Unbounded Memory Allocation
Severity: Medium
date: 2026-06-25 (Published)

Prediction: Patch available (0.32.1)

What Undercode Say:

Analyzing the vulnerability from an operational perspective, the key risk is the discrepancy between inbound and outbound limit enforcement. The W3C limits were already in place for outgoing requests, creating a false sense of security. The parsing of a large header, even if ultimately discarded, consumes valuable CPU cycles and memory. This is particularly dangerous in environments where transport-layer header limits are not configured or are set too high, as the application itself becomes the bottleneck.

Check the current version of opentelemetry_sdk in your Cargo.toml
grep opentelemetry_sdk Cargo.toml
Example of a vulnerable version
opentelemetry_sdk = "0.31.0"
To find the latest version, use:
cargo search opentelemetry_sdk

Exploit:

A remote, unauthenticated attacker can exploit this vulnerability by sending a single HTTP request with a maliciously crafted `baggage` header that exceeds the W3C size limits.

Example curl command to send an oversized baggage header
This creates a header with ~9000 bytes, exceeding the 8192-byte limit.
curl -H "baggage: $(python3 -c "print('key=' + 'A'9000)")" http://vulnerable-service:8080/

This command will cause the target service to parse the large header, leading to increased CPU usage and memory allocation, which can degrade performance or cause a denial of service.

Protection:

  1. Upgrade: The primary and most effective mitigation is to upgrade the `opentelemetry_sdk` dependency to version `0.32.1` or later.
  2. Workaround: If an immediate upgrade is not possible, implement a workaround by rejecting or truncating inbound `baggage` headers larger than 8,192 bytes before they reach the OpenTelemetry propagation extraction logic. This can be done at various layers:
    Reverse Proxy/Gateway: Configure your ingress controller (e.g., Nginx, Envoy) to limit the size of HTTP headers.
    Middleware: Implement custom middleware in your application to check the header size and reject requests that are too large.
    Custom Carrier Boundary: If using a non-HTTP transport, ensure that size limits are enforced at the boundary where data enters the system.

Impact:

Availability: The primary impact is a denial-of-service risk. By sending oversized baggage headers, an attacker can cause excessive CPU usage and memory allocation, potentially overwhelming the service and making it unresponsive to legitimate traffic.
Confidentiality: None. The vulnerability does not expose any telemetry data, application data, or internal state.
Integrity: None. The vulnerability does not allow an attacker to modify any data.
Code Execution: None. The vulnerability is a resource exhaustion issue and does not provide a path for arbitrary code execution.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top