---
id: "CVE-2026-118259"
kind: "vulnerability"
aliases: ["CVE-2026-118259", "GHSA-ccrj-gw8r-854m"]
title: "opentelemetry-java: Quadratic CPU consumption in W3C tracestate parsing"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "io.opentelemetry:opentelemetry-api", "fixed": ["1.67.0"], "affected": "<= 1.66.0", "ecosystem": "maven"}]
ecosystems: ["maven"]
tags: ["cwe-1333", "java", "microservices", "opentelemetry", "package", "self-hosted"]
not_affected_if: ["header-size-limits", "no-incoming-trace-context"]
published_at: "2026-10-28T19:17:30+00:00"
first_seen_at: "2026-10-28T19:34:55+00:00"
updated_at: "2026-10-28T21:07:44+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118259", "first_seen_at": "2026-10-28T19:34:55+00:00"}, {"source": "ghsa", "url": "https://github.com/advisories/GHSA-ccrj-gw8r-854m", "first_seen_at": "2026-10-28T21:07:44+00:00"}]
---

# opentelemetry-java: Quadratic CPU consumption in W3C tracestate parsing

opentelemetry-java's W3C trace context extractor uses a regex that backtracks badly on tracestate headers with long runs of spaces or tabs and no comma. An unauthenticated attacker sending such headers can tie up request or event-loop threads and drive up CPU use.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- maven:io.opentelemetry:opentelemetry-api affected <= 1.66.0 fixed 1.67.0

## How to check

- Check the opentelemetry-java version in the build file or dependency tree (for example `./gradlew dependencies` or `mvn dependency:tree`) and look for `opentelemetry-api` or `opentelemetry-sdk` below `1.67.0`

## Fix

- Upgrade opentelemetry-java (`opentelemetry-api` and `opentelemetry-sdk`) to `1.67.0` or later
- Limit inbound header size at the ingress or proxy as a stopgap

## Timeline

- 2026-10-28T19:34:55+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118259
- 2026-10-28T21:07:44+00:00 ghsa https://github.com/advisories/GHSA-ccrj-gw8r-854m

## From the sources

### 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](https://github.com/open-telemetry/opentelemetry-java/pull/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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
