Loading...
Skip to main content

CVE-2026-40894 — Vulnerability in...

MEDIUM

OpenTelemetry dotnet: Excessive memory allocation when parsing OpenTelemetry propagation headers

Published April 23, 2026Updated September 10, 2026Source: osv

Summary

### Summary The implementation details of the baggage, B3 and Jaeger processing code in the `OpenTelemetry.Api` and `OpenTelemetry.Extensions.Propagators` NuGet packages can allocate excessive memory when parsing which could create a potential denial of service (DoS) in the consuming application. ### Details #### Exceeding Limits [`BaggagePropagator.Inject<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/fc1a2864d1665bda857089e11fe9247e3c75637a/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs#L93-L112) does not enforce the length limit of `8192` characters if the injected baggage contains only one item. This change was introduced by #1048. #### Excessive allocation The following methods eagerly allocate intermediate arrays before applying size limits. - [`BaggagePropagator.Extract<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/888d1bf2489fb7408d3c5e8758a5bbffa89a8fb2/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs#L52-L55) - this change was introduced by #1048. - [`BaggagePropagator.Inject<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/888d1bf2489fb7408d3c5e8758a5bbffa89a8fb2/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs#L138-L157) - this change was introduced by #1048. - [`B3Propagator.Extract<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/888d1bf2489fb7408d3c5e8758a5bbffa89a8fb2/src/OpenTelemetry.Extensions.Propagators/B3Propagator.cs#L203-L207) - this change was introduced by #533. - [`B3Propagator.Extract<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/888d1bf2489fb7408d3c5e8758a5bbffa89a8fb2/src/OpenTelemetry.Api/Context/Propagation/B3Propagator.cs#L204-L214) - this change was introduced by #3244. - [`JaegerPropagator.Extract<T>()`](https://github.com/open-telemetry/opentelemetry-dotnet/blob/888d1bf2489fb7408d3c5e8758a5bbffa89a8fb2/src/OpenTelemetry.Extensions.Propagators/JaegerPropagator.cs#L150-L154) - this change was introduced by #3309. ### Impact Excessively large propagation headers, particularly in degenerate/malformed cases that consist or large numbers of delimiter characters, can allocate excessive amounts of memory for intermediate storage of parsed content relative to the size of the original input. ### Mitigation HTTP servers often set maximum limits on the length of HTTP request headers, such as [Internet Information Services (IIS)](https://learn.microsoft.com/iis/configuration/system.webserver/security/requestfiltering/requestlimits/headerlimits/) which sets a default limit of 16KB and [nginx](https://nginx.org/docs/http/ngx_http_core_module.html#large_client_header_buffers) which sets a default limit of 8KB. ### Workarounds Possible workarounds include: - Configuring appropriate HTTP request header limits. - Disabling baggage and/or trace propagation. ### Remediation [#7061](https://github.com/open-telemetry/opentelemetry-dotnet/pull/7061) refactors the handling of baggage, B3 and Jaeger propagation headers to stop parsing eagerly when limits are exceeded and avoid allocating intermediate arrays.

Advisory Timeline

  • First published April 23, 2026 (172 days ago).
  • Last revised September 10, 2026 — 139 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update OpenTelemetry.Extensions.Propagators to 1.15.3 or later
dotnet add package OpenTelemetry.Extensions.Propagators --version 1.15.3
NuGet
Update OpenTelemetry.Api to 1.15.3 or later
dotnet add package OpenTelemetry.Api --version 1.15.3

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: nuget (2).

PackageEcosystemAffectedFixed In
OpenTelemetry.Extensions.Propagators
nuget
1.10.0, 1.11.0, 1.11.1, 1.11.2 (+17 more)1.15.3
OpenTelemetry.Api
nuget
1.0.0-rc2, 1.0.0-rc3, 1.0.0-rc4, 1.0.1 (+34 more)1.15.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

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

Frequently Asked Questions

What is CVE-2026-40894?
OpenTelemetry dotnet: Excessive memory allocation when parsing OpenTelemetry propagation headers This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
How do I check if my project is affected by CVE-2026-40894?
CVE-2026-40894 affects OpenTelemetry.Extensions.Propagators and OpenTelemetry.Api. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-40894 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.3

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-g94r-2vxg-569j

Related CVEs

  • CVE-2026-106111
    MEDIUM

    ImageSharp: EXR ZIP decoder can expose stale allocator data after a short inflate

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

  • CVE-2025-27513
    MEDIUM

    OpenTelemetry .NET has Denial of Service (DoS) Vulnerability in API Package

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies