Vulnerabilities in pkg:pypi/opentelemetry-api

PACKAGE
Advisory Identifier: GHSA-mf5v-w3w3-f6cg
Advisory Summary

CVE-2026-126360 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting OpenTelemetry Python API libraries in the PyPI ecosystem. The issue involves denial of service through quadratic-time traceparent parsing. Remediation is available by upgrading affected packages to version 1.45.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/opentelemetry-api

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/opentelemetry-api. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mf5v-w3w3-f6cg CVE-2026-126360 MODERATE OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing

CVE-2026-126360 at a Glance

CVE Identifier CVE-2026-126360
GHSA Identifier GHSA-mf5v-w3w3-f6cg
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product OpenTelemetry Python API
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-126360

To remediate this vulnerability, upgrade all affected OpenTelemetry Python API dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

opentelemetry-api fixed: 1.45.2
pip install opentelemetry-api>=1.45.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show opentelemetry-api

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-126360, inspect your installed packages using pip:

pip show opentelemetry-api

Analyze the terminal output to locate any version of OpenTelemetry Python API in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.45.2), your application is affected.

Note: The pip show opentelemetry-api command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In OpenTelemetry Python API, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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.

CVE-2026-126360 Affected OpenTelemetry Python API Versions

1 component(s)
Fixed Versions:
1.45.2
Product / Package Ecosystem Affected Versions Fixed Version
opentelemetry-api
PyPI
< 1.45.2
1.45.2

References

Frequently Asked Questions

What is CVE-2026-126360?
CVE-2026-126360 is a security vulnerability in OpenTelemetry Python API involving Denial of service through quadratic-time traceparent parsing under CWE-1333: Inefficient Regular Expression Complexity.
Which OpenTelemetry Python API versions are affected?
Affected versions include releases prior to 1.45.2 across affected packages: opentelemetry-api.
What version fixes CVE-2026-126360?
Upgrading to 1.45.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is opentelemetry-api affected?
Yes, opentelemetry-api is affected in releases prior to 1.45.2. Upgrade your dependency to 1.45.2 or later.
What is the CVSS score of CVE-2026-126360?
CVE-2026-126360 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-126360?
CVE-2026-126360 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check PyPI dependencies for CVE-2026-126360?
Run the dependency tree command: 'pip show opentelemetry-api'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mf5v-w3w3-f6cg",
  "modified" : "2026-11-13T16:43:18Z",
  "published" : "2026-11-13T16:43:18Z",
  "aliases" : [ "CVE-2026-126360" ],
  "summary" : "OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing",
  "details" : "## Summary\n\n`TraceContextTextMapPropagator.extract()` in `opentelemetry-api` is vulnerable to regular expression denial of service (ReDoS) when processing a specially crafted `traceparent` value.\n\nA 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.\n\nWhen extraction runs on an asynchronous server’s event-loop thread, a single malicious message can delay unrelated requests handled by that event loop.\n\n## Exposure conditions\n\nExploitation requires attacker-controlled input to reach the affected propagator through a carrier that preserves embedded newlines and permits a sufficiently large value.\n\nConforming 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.\n\nMCP 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.\n\nAuthentication requirements depend on the application exposing the carrier.\n\n## Impact\n\nThe demonstrated impact is denial of service through excessive CPU consumption and blocked request processing. Repeated malicious messages may sustain service degradation.\n\nThis finding does not demonstrate data disclosure, data modification, or code execution.\n\n## Remediation\n\nUpgrade `opentelemetry-api` to `1.45.2` or a later release containing the fix.\n\nVersion `1.45.2` rejects `traceparent` values longer than 512 characters before regex matching and removes the overlapping suffix and trailing-whitespace expressions.\n\nWhere upgrading is temporarily unavailable, reject oversized values and embedded CR/LF characters before passing untrusted trace-context values to the affected propagator.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "opentelemetry-api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.45.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.45.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/security/advisories/GHSA-mf5v-w3w3-f6cg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-126360"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/pull/5818"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/pull/5856"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/commit/78123a2755c907c602e02352aebed4be86aa5350"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/commit/faa72dae511ae64a7bf8ca63eff9ad4387d0b939"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/open-telemetry/opentelemetry-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.45.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-13T16:43:18Z",
    "nvd_published_at" : "2026-11-13T00:20:11Z"
  }
}