CVE-2026-50277: dd-trace-cpp: Improper parsing of W3C baggage headers may lead to DoS
dd-trace-cpp is the Datadog distributed tracing library for C++. Prior to 2.1.0, dd-trace-cpp parses incoming W3C baggage headers without enforcing DDTRACEBAGGAGEMAXITEMS or DDTRACEBAGGAGEMAXBYTES on the extraction path, even though those limits are enforced during injection. A remote unauthenticated attacker can send a header containing many comma-separated key-value pairs or one very large value, causing per-request hash-map allocation and unbounded CPU and memory consumption. Baggage extraction is enabled by default in most affected tracers unless baggage is removed from DDTRACEPROPAGATIONSTYLE or DDTRACEPROPAGATIONSTYLEEXTRACT, so affected internet-facing services can be denied service. This issue is fixed in version 2.1.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
dd-trace-cppto a version that resolves this vulnerability.Fixed in 2.1.0 - Configuration
Disable Baggage extraction for internet-facing services by removing 'baggage' from DD_TRACE_PROPAGATION_STYLE (the issue affects tracers where baggage extraction is enabled by default).
dd-trace-cpp DD_TRACE_PROPAGATION_STYLE = remove_baggage - Configuration
Disable Baggage extraction for internet-facing services by removing 'baggage' from DD_TRACE_PROPAGATION_STYLE_EXTRACT (the issue affects tracers where baggage extraction is enabled by default).
dd-trace-cpp DD_TRACE_PROPAGATION_STYLE_EXTRACT = remove_baggage
Event History
Frequently Asked Questions
Which deployments are most exposed to exploitation?
Internet-facing services using affected dd-trace-cpp versions are most exposed because an unauthenticated remote attacker can send malicious incoming W3C baggage headers. Baggage extraction is enabled by default in most affected tracers.
What does an attacker need to send to trigger the denial of service?
The attacker only needs network access to send requests with a W3C baggage header containing many comma-separated key-value pairs or a single very large value. No authentication or user interaction is required.
What can be done if upgrading is not immediately possible?
Remove baggage from DD_TRACE_PROPAGATION_STYLE or DD_TRACE_PROPAGATION_STYLE_EXTRACT to disable baggage extraction. This prevents the vulnerable extraction path from processing incoming baggage headers.
Which version contains the fix?
The issue is fixed in dd-trace-cpp version 2.1.0. Versions prior to 2.1.0 are affected.