NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Maven

CVE-2026-118259: opentelemetry-java: Quadratic CPU consumption in W3C tracestate parsing

mediumCVSS 3.1 5.3GHSA-ccrj-gw8r-854m

OpenTelemetry Java's `W3CTraceContextPropagator.extract()` burns CPU quadratically on crafted `tracestate` headers with long runs of spaces or tabs. An unauthenticated client can slow or stall a service that extracts trace context. Upgrade `io.opentelemetry:opentelemetry-api` to 1.67.0 or later.

Published Oct 28, 2026 · Analysis Nov 1, 2026

What an attacker can do

The tracestate parser split the header with a regular expression. Regex backtracking makes parse time grow with the square of the input when a header contains a long run of spaces or tabs that is not followed by a comma. A request with one such header costs far more CPU than its size suggests.

The attacker needs nothing but the ability to send HTTP requests, or any messages with headers, to a service that propagates W3C trace context through the Java agent or SDK. No authentication is required, since extraction happens before application logic. Parsing blocks the calling thread. If extraction runs on a shared event-loop thread, other connections on that thread stall as well.

The result is a denial of service, with no data exposure and no code execution. The advisory notes the real impact depends on header-size limits, proxy configuration and threading. Header-size limits reduce the cost per request but do not remove the flaw, because an attacker can repeat requests. Services behind a proxy that caps header size are less exposed than those that accept large headers directly.

Who is affected

io.opentelemetry:opentelemetry-api up to and including 1.66.0, in any application or agent that uses W3CTraceContextPropagator (the default propagator) to extract incoming headers. The library is often pulled in transitively, and also bundled in the OpenTelemetry Java agent, so check dependency trees.

mvn dependency:tree -Dincludes=io.opentelemetry
gradle dependencies --configuration runtimeClasspath | grep opentelemetry-api

io.opentelemetry:opentelemetry-api

Ecosystem
Maven
Affected
<= 1.66.0
Fixed in
1.67.0
Check
mvn dependency:tree -Dincludes=io.opentelemetry:opentelemetry-api

How to fix it

Upgrade io.opentelemetry:opentelemetry-api to 1.67.0 or later. In Maven, set the version of the OpenTelemetry BOM or the dependency to 1.67.0, then rebuild and redeploy. Pull request 8914 replaces the regex delimiter splitting with literal comma scanning and explicit whitespace trimming. If you cannot upgrade, reject or remove oversized tracestate headers at your proxy or in a filter before trace-context extraction. This lowers the cost per request but does not remove the risk from repeated requests. If you use the Java agent, update the agent jar to a release based on 1.67.0.

How to tell if you were hit

Look for sudden CPU spikes on request-handling threads, with thread dumps showing frames in W3CTraceContextPropagator.extract or java.util.regex code. Check access logs or proxy logs for requests with an unusually large tracestate header, particularly one made mostly of spaces or tabs. Rising latency across unrelated endpoints on the same event-loop thread is another sign. Confirm which version you run with the dependency tree commands above.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

OpenTelemetry Java's W3C trace-context propagator permits excessive CPU consumption when extracting crafted tracestate headers, potentially leading to denial of service. Regex backtracking causes quadratic parsing time for headers containing long runs of spaces or tabs without a following comma.

Impact

An unauthenticated attacker whose headers reach W3CTraceContextPropagator.extract() can cause excessive CPU usage through crafted requests. Parsing blocks the calling thread, potentially affecting other connections when extraction runs on a shared event-loop thread. Actual impact depends on ingress header-size limits, proxy configuration, and threading. Header-size limits reduce the per-request cost but do not eliminate the vulnerability.

Patches

Upgrade io.opentelemetry:opentelemetry-api to version 1.67.0 or later. PR #8914 replaces regex delimiter splitting with literal comma scanning and explicit whitespace trimming.

Workarounds

If upgrading is not possible, reject or remove oversized tracestate headers before trace-context extraction. This reduces the per-request parsing cost but does not eliminate the risk from repeated requests.

Questions

Does CVE-2026-118259 need authentication?

No. An unauthenticated attacker whose headers reach W3CTraceContextPropagator.extract() can trigger it.

Do header size limits fix it?

They reduce the cost of each request but do not remove the vulnerability, according to the advisory. Repeated requests can still add up. Upgrade to 1.67.0.

Can this lead to code execution or data leaks?

No. The only impact described is excessive CPU consumption, a denial of service.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Maven vulnerabilities

All Maven entries