CVE-2026-54788: dd-trace-rs: Unbounded W3C tracestate parsing may lead to DoS
Impact Datadog tracing libraries that implement W3C Trace Context (tracecontext) propagation parse the incoming tracestate header without enforcing a size cap on the Datadog vendor entry (dd=...). The dd= value contains semicolon-separated key:value pairs, and the parser allocates a hash-map entry for each pair. A remote, unauthenticated attacker can send a tracestate header whose dd= member is arbitrarily large (or contains an arbitrarily large number of pairs), forcing unbounded CPU and memory consumption per request and enabling a remote Denial of Service. tracecontext extraction is enabled by default in affected tracers, so any internet-facing service instrumented with an affected version is exposed unless tracecontext has been explicitly removed from the propagation style configuration.
Patches This is resolved in version 0.3.3 and later of the dd-trace-rs library.
Workarounds If you cannot upgrade immediately: 1. Disable tracecontext extraction by setting DDTRACEPROPAGATIONSTYLEEXTRACT to a value that does not include tracecontext (for example, datadog). 2. Cap the maximum HTTP request header size at an upstream proxy or web server.
Other sources
dd-trace-rs provides Datadog application performance monitoring for Rust. From 0.1.0 until 0.3.3, datadog-opentelemetry/src/propagation/tracecontext.rs parses the W3C tracestate header and collects every semicolon-separated key and value pair in the Datadog dd=... vendor entry into a HashMap without enforcing a pair count or entry size limit. Because tracecontext extraction is enabled by default, a remote unauthenticated attacker can send an arbitrarily large dd=... entry and force excessive CPU and memory consumption for each request, causing denial of service in an instrumented network service. This vulnerability is fixed in 0.3.3.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/datadog-opentelemetryto a version that resolves this vulnerability.Fixed in 0.3.3 - Upgrade
Upgrade
dd-trace-rsto a version that resolves this vulnerability.Fixed in 0.3.3 - Configuration
Disable tracecontext extraction by setting DD_TRACE_PROPAGATION_STYLE_EXTRACT to a value that does not include `tracecontext` (e.g., `datadog`), since tracecontext extraction is enabled by default in affected tracers.
Datadog tracing libraries (W3C Trace Context tracecontext propagation) DD_TRACE_PROPAGATION_STYLE_EXTRACT = a value that does not include tracecontext (for example, datadog) - Compensating control
Cap the maximum HTTP request header size at an upstream proxy or web server to limit the size of a malicious `tracestate` header (including arbitrarily large `dd=` values).
Event History
Frequently Asked Questions
Which deployments are exposed to this denial-of-service condition?
Internet-facing services instrumented with an affected Datadog tracer are exposed when W3C Trace Context extraction is enabled. This extraction is enabled by default unless tracecontext has been explicitly removed from the propagation-style configuration.
What must an attacker do to exploit the issue?
An unauthenticated remote attacker only needs to send requests with a tracestate header containing an oversized Datadog dd= entry or a very large number of semicolon-separated key:value pairs. Processing those pairs can consume unbounded CPU and memory for each request.
What can be done if upgrading is not immediately possible?
Remove tracecontext from DD_TRACE_PROPAGATION_STYLE_EXTRACT, for example by setting it to datadog. Also enforce a maximum HTTP request-header size at an upstream proxy or web server.
Which version contains the fix?
The issue is resolved in dd-trace-rs version 0.3.3 and later.