A regular expression denial of service (ReDoS) vulnerability in the OpenTelemetry Python API can cause excessive CPU consumption and request-processing delays when applications extract trace context from untrusted input.
Quick Take
- What: CVE-2026-126360 is a ReDoS vulnerability in
TraceContextTextMapPropagator.extract()in opentelemetry-api that triggers quadratic-time regex backtracking - Who is affected: Applications using opentelemetry-api version 1.45.1 or earlier that extract trace context from untrusted carriers accepting malformed strings
- Severity: Medium (CVSS 5.3), denial of service through CPU exhaustion and blocked request processing
- Fixed version: opentelemetry-api 1.45.2
- What to do: Upgrade to opentelemetry-api 1.45.2 or later, or reject oversized values and embedded CR/LF characters before passing untrusted trace-context values to the propagator
In plain English
OpenTelemetry is a tool that developers use to track how requests flow through their applications. A bug in the Python version allows an attacker to send a specially crafted tracking value that causes the server to spend excessive time processing it, slowing down or blocking other requests. This is called a denial of service attack. The problem happens when the code tries to match a pattern in the tracking value using a regular expression that can take a very long time on certain malformed inputs.
What you should do: If you are not a developer or do not use OpenTelemetry Python in your applications, you can ignore this. If you do use it, you should upgrade to version 1.45.2.
What happened
The TraceContextTextMapPropagator.extract() function in opentelemetry-api is vulnerable to regular expression denial of service 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.
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, but 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.
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.
What you should do
Upgrade opentelemetry-api to version 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.
What it means
This vulnerability allows attackers to cause denial of service in applications that use OpenTelemetry Python API to extract trace context from untrusted input. The attack exploits inefficient regular expression matching to consume excessive CPU time. The fix in version 1.45.2 adds input validation to reject malformed values before they reach the vulnerable regex.



