Medium

OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing

  • Disclosed: 13.11.2026
  • Updated: 13.11.2026 18:17

Summary

TraceContextTextMapPropagator.extract() in opentelemetry-api is vulnerable to regular expression denial of service (ReDoS) when processing a specially crafted traceparent value.

A malformed value containing a trace-context prefix followed by a long whitespace sequence and an embedded newline triggers quadratic-time regex backtracking. Applications that extract trace context from untrusted carriers accepting such strings can experience excessive CPU consumption and request-processing delays.

When extraction runs on an asynchronous server’s event-loop thread, a single malicious message can delay unrelated requests handled by that event loop.

Exposure conditions

Exploitation requires attacker-controlled input to reach the affected propagator through a carrier that preserves embedded newlines and permits a sufficiently large value.

Conforming HTTP header values cannot contain embedded newlines. However, OpenTelemetry carriers are not restricted to HTTP headers. JSON strings can contain escaped newlines that become newline characters after decoding.

MCP request metadata is one relevant integration path: applications may extract trace context from JSON params._meta. Exposure depends on the MCP SDK or instrumentation version, whether extraction invokes the W3C Trace Context propagator, and applicable message-size limits. HTTP header validation does not constrain a traceparent string carried inside a JSON body.

Authentication requirements depend on the application exposing the carrier.

Impact

The demonstrated impact is denial of service through excessive CPU consumption and blocked request processing. Repeated malicious messages may sustain service degradation.

This finding does not demonstrate data disclosure, data modification, or code execution.

Remediation

Upgrade opentelemetry-api to 1.45.2 or a later release containing the fix.

Version 1.45.2 rejects traceparent values longer than 512 characters before regex matching and removes the overlapping suffix and trailing-whitespace expressions.

Where upgrading is temporarily unavailable, reject oversized values and embedded CR/LF characters before passing untrusted trace-context values to the affected propagator.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) opentelemetry-api < 1.45.2 1.45.2

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness (CWE)
CWE-1333
Platform
Python (PyPI)
Package
opentelemetry-api
Disclosed
13.11.2026
Updated
13.11.2026 18:17

Sources and licenses

OSV / GitHub Advisory Database - GHSA-mf5v-w3w3-f6cg - CC BY 4.0

Vulnerability history: opentelemetry-api

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
10.2026 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Medium 2

Disclosures per year

  1. 2026: 2
  1. OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing this entry
    Medium · 5.3 CVE-2026-126360 < 1.45.2 1.45.2
  2. Medium · 5.3 CVE-2026-114603 < 1.45.1 1.45.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.