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-40894

CVE-2026-40894: Excessive Memory Allocation in OpenTelemetry .NET Propagation Headers

Alon Barad
Alon Barad
Software Engineer

Apr 23, 2026·6 min read·175 visits

Executive Summary (TL;DR)

OpenTelemetry .NET SDK versions up to 1.15.2 are vulnerable to a Denial of Service (DoS) attack via unauthenticated memory exhaustion (CWE-789). Maliciously crafted propagation headers force eager memory allocations, causing high garbage collection pressure. Patch to version 1.15.3 to resolve the issue.

The OpenTelemetry .NET SDK contains a denial of service vulnerability due to excessive memory allocation during the parsing of propagation headers. Vulnerable versions utilize eager allocation strategies, specifically `string.Split()`, to process Baggage, B3, and Jaeger headers. Unauthenticated remote attackers can exploit this by submitting crafted headers containing dense sequences of delimiters, forcing the application to allocate thousands of objects per request. This results in severe garbage collection pressure and potential OutOfMemoryException conditions. The vulnerability is fixed in version 1.15.3.

Vulnerability Overview

The OpenTelemetry .NET SDK provides instrumentation for distributed tracing, metrics, and logging. A core component of distributed tracing is context propagation, which ensures trace IDs, span IDs, and custom metadata (Baggage) are passed across service boundaries. The SDK extracts this context from incoming HTTP requests by reading standard propagation headers, including Baggage, B3, and Jaeger headers.

CVE-2026-40894 describes an allocation amplification vulnerability within the header parsing logic of OpenTelemetry.Api and OpenTelemetry.Extensions.Propagators. The vulnerability is classified under CWE-789 (Memory Allocation with Excessive Size Value). When the SDK processes incoming propagation headers, it employs an eager allocation strategy that scales linearly with the number of delimiter characters present in the header string, regardless of the actual data content.

An attacker with network access to an exposed service running the vulnerable OpenTelemetry .NET SDK can trigger this vulnerability by sending HTTP requests with intentionally malformed context headers. Because context propagation operates early in the ASP.NET Core request pipeline—often before authentication or application-level routing—this vulnerability is exploitable without credentials and affects the entire application surface area.

Root Cause Analysis

The fundamental flaw lies in the BaggagePropagator, B3Propagator, and JaegerPropagator classes, which utilized string.Split() to separate key-value pairs and list items. This method parses the entire input string immediately, creating an intermediate array of strings and allocating memory for each resulting substring. This pattern occurs before the SDK validates the total length of the header or the number of items it contains.

In the .NET memory model, each string allocation incurs overhead. A header payload of 8,192 bytes consisting entirely of comma delimiters (,) will instruct string.Split(',') to allocate an array capable of holding 8,193 references, followed by the instantiation of 8,193 empty string objects on the managed heap. The memory consumed by these objects significantly exceeds the original 8-kilobyte footprint of the header string.

Furthermore, a logic flaw in BaggagePropagator.Inject<T>() bypassed the standard 8,192-character limit if the baggage collection contained exactly one item. This allowed an application processing a malicious payload to serialize and propagate an oversized header to downstream microservices. This cascading effect broadens the denial-of-service condition across the internal service mesh.

Code Analysis

The unpatched implementation relied on framework methods that generated managed allocations per delimiter. The fix, introduced in PR #7061, fundamentally alters the string processing model by replacing string.Split with manual parsing utilizing ReadOnlySpan<char>. The use of Span<T> allows the SDK to view and traverse segments of the original header string without duplicating memory.

The updated B3Propagator utilizes a custom ReadNextPart function. This function iterates through the header string using pointer arithmetic conceptually, isolating segments of the string sequentially.

// Refactored logic in B3Propagator.cs introduced in v1.15.3
private static ReadOnlySpan<char> ReadNextPart(ReadOnlySpan<char> header, int position, out int nextPosition)
{
    var remaining = header.Slice(position);
    var separatorIndex = remaining.IndexOf(XB3CombinedDelimiter);
    if (separatorIndex < 0)
    {
        nextPosition = header.Length;
        return remaining;
    }
    var result = remaining.Slice(0, separatorIndex);
    nextPosition = position + separatorIndex + 1;
    return result;
}

This refactored logic operates entirely without heap allocations. Slice and IndexOf execute quickly over the contiguous memory area of the original string. Additionally, the patch introduces strict limit enforcement during the iteration phase. The parser actively tracks the item count and halts processing immediately if the 180-item limit or the 8,192-character limit is exceeded, neutralizing the allocation amplification vector.

Exploitation Methodology

Exploitation of CVE-2026-40894 requires an attacker to repeatedly submit HTTP requests containing crafted headers. The payload consists of standard HTTP headers targeting the OpenTelemetry extraction keys, such as baggage or b3. The value of the header is constructed entirely of delimiter characters.

A single HTTP request carrying baggage: ,,,,,[...5000 commas...] triggers the immediate allocation of thousands of string objects in Generation 0 of the .NET Garbage Collector. While Gen 0 collections are fast, sustained concurrent requests rapidly exhaust Gen 0 capacity. This forces the runtime to promote objects to Generation 1 and Generation 2.

When Generation 2 collections are triggered frequently, the .NET runtime suspends application execution (a "stop-the-world" pause) to compact the heap. This CPU-intensive process blocks thread execution, resulting in severe latency degradation. If the incoming request rate exceeds the garbage collector's ability to free memory, the application will throw an OutOfMemoryException and terminate.

Supporting Vulnerabilities and Systemic Flaws

The patch cycle that resolved CVE-2026-40894 also addressed related resource management vulnerabilities in the SDK. In PR #7064, the GrpcStatusDeserializer within OpenTelemetry.Exporter.OpenTelemetryProtocol was modified. The deserializer previously trusted the length prefix (Varint) of incoming GRPC status messages, allocating byte arrays based on the attacker-controlled length value without verifying the actual stream length. This provided another avenue for uncontrolled memory allocation.

Additionally, PR #7069 addressed a resource leak in the background export workers (BatchExportTaskWorker and PeriodicExportingMetricReaderTaskWorker). In specific environments, such as Blazor WebAssembly, these workers leaked asynchronous tasks. This failure to release task resources resulted in linear memory growth over the lifetime of the application.

These combined findings indicate a systemic pattern of trust in external input lengths and suboptimal resource management in earlier versions of the SDK. The transition to Span-based processing and strict boundary validation in version 1.15.3 marks a critical architectural hardening against resource exhaustion attacks.

Remediation and Mitigation

The primary remediation for CVE-2026-40894 is to update all dependencies on OpenTelemetry.Api and OpenTelemetry.Extensions.Propagators to version 1.15.3 or later. Developers must ensure that all transient dependencies are also updated, which may require explicit package references in the project file to force NuGet to resolve the patched version.

If immediate patching is not possible, organizations can apply mitigation controls at the ingress layer. Web Application Firewalls (WAF) or API Gateways can be configured to drop requests containing baggage, b3, or uber-trace-id headers that exceed a specific character length or contain an excessive number of delimiter characters. Limiting the length of these headers to 1,024 characters will effectively mitigate the denial-of-service vector without interrupting normal distributed tracing operations.

Organizations should monitor application memory metrics and garbage collection frequency. Sudden spikes in Gen 2 collections, coupled with high allocations of string arrays, indicate potential exploitation attempts. Analyzing incoming HTTP traffic for abnormally large or malformed tracing headers will confirm the presence of this attack vector.

Official Patches

OpenTelemetryGitHub Security Advisory
OpenTelemetryFix Pull Request

Technical Appendix

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

Affected Systems

OpenTelemetry .NET SDKASP.NET Core applications utilizing OpenTelemetry instrumentationMicroservices relying on baggage and b3 propagation

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenTelemetry.Api
OpenTelemetry
>= 0.5.0-beta.2, <= 1.15.21.15.3
OpenTelemetry.Extensions.Propagators
OpenTelemetry
>= 1.3.1, <= 1.15.21.15.3
AttributeDetail
CWE IDCWE-789
Attack VectorNetwork
CVSS v3.15.3
EPSSN/A
ImpactDenial of Service (DoS)
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1190Exploit Public-Facing Application
Initial Access
CWE-789
Memory Allocation with Excessive Size Value

Memory Allocation with Excessive Size Value

Vulnerability Timeline

Preliminary release updates (1.15.2) initiated.
2026-04-08
PR #7061 merged, addressing the core allocation issues.
2026-04-13
CVE-2026-40894 disclosed and fixed version 1.15.3 released.
2026-04-23

References & Sources

  • [1]GHSA-g94r-2vxg-569j
  • [2]PR 7061: Add propagation fuzz tests and fix findings
  • [3]PR 7064: OTLP Status Fix
  • [4]PR 7069: Resource Leak Fix
  • [5]CVE-2026-40894 Record

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

•35 minutes ago•CVE-2026-68587
9.2

CVE-2026-68587: Broken Access Control in SiYuan Note Transaction Endpoints

CVE-2026-68587 is a critical authorization bypass vulnerability in SiYuan, an open-source personal knowledge management workspace. When deployed in publish mode, specific transaction endpoints fail to perform administrative role validation. This omission enables unauthenticated remote readers to retrieve the rendered Document Object Model (DOM) of publish-disabled (private) documents by supplying a target heading block identifier. Upgrading to version v3.7.3 or later resolves this issue by applying appropriate routing middleware constraints.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 2 hours ago•CVE-2026-68586
9.2

CVE-2026-68586: Missing Authorization in SiYuan Backlink Content Endpoints Allows Information Disclosure

SiYuan is a privacy-first personal knowledge management system. In versions prior to v3.7.3, the application fails to apply publish-access filters to the getBacklinkDoc and getBackmentionDoc content endpoints (/api/ref/getBacklinkDoc and /api/ref/getBackmentionDoc). While the corresponding backlink list endpoints correctly filter out publish-forbidden documents, the content endpoints, which are only gated by high-level route authorization checks via CheckAuth, do not. Consequently, a user with low-privilege read access, or an anonymous reader when publish Basic Auth is disabled, can directly invoke these endpoints using a known publish-forbidden document's ID to retrieve its rendered DOM content or determine whether it references a specific target block.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 3 hours ago•CVE-2026-68585
5.8

CVE-2026-68585: Metadata Disclosure via Missing Authorization in SiYuan API

A metadata disclosure vulnerability exists in SiYuan prior to version v3.7.3. The /api/block/getBlockInfo endpoint fails to validate authorization boundaries in publish mode, allowing anonymous readers to access private document metadata.

Alon Barad
Alon Barad
3 views•8 min read
•about 4 hours ago•CVE-2026-72812
6.5

CVE-2026-72812: Broken Access Control and SQL Injection in SiYuan

A critical authorization bypass vulnerability exists in SiYuan personal knowledge management system before v3.7.4. The /api/ref/refreshBacklink endpoint lacks administrative role verification, enabling unauthenticated users to initiate database transactions and disk operations. When combined with an unsafe SQL generation pattern in nested backlink queries, an attacker can exploit a secondary SQL injection vulnerability to compromise local databases or cause denial-of-service conditions.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 5 hours ago•CVE-2026-72811
10.0

CVE-2026-72811: Remote SQL Injection in SiYuan Backlink and Mention Search Engine

A critical SQL Injection vulnerability exists in the SiYuan note-taking application (versions <= v3.7.2) due to improper neutralization of single quotes within the backlink and mention search queries. Because the application constructs SQLite Full Text Search (FTS) queries via direct string concatenation and uses a database driver that supports stacked query statements, remote unauthenticated attackers can execute arbitrary SQL commands on the master database, compromising all hosted notebooks. This issue has been fully remediated in version v3.7.4.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 6 hours ago•CVE-2026-72810
8.6

CVE-2026-72810: Publish-Boundary Bypass and Real-Time Data Leakage via WebSocket Session Pollution in SiYuan

CVE-2026-72810 is a critical publish-boundary bypass vulnerability in the SiYuan personal knowledge management system before version 3.7.4. The flaw lies in the backend real-time WebSocket broadcast mechanism. When configured in public publish mode, the system fails to differentiate between unauthenticated public reader sessions and authorized administrative sessions within its global connection pool. This architectural oversight allows unauthenticated remote attackers connecting to the public WebSocket endpoint on port 6808 to passively receive real-time, raw workspace modification events, including keystroke logs, block updates, and content from protected or forbidden documents.

Amit Schendel
Amit Schendel
4 views•7 min read