dd-trace-go: Improper parsing of W3C baggage headers may lead to DoSGHSA-74j5-xf3v-crq8
HIGHGHSA-74j5-xf3v-crq8 is a high-severity (CVSS 7.5) CWE-770 vulnerability in github.com/DataDog/dd-trace-go. A fix is available for github.com/DataDog/dd-trace-go — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-74j5-xf3v-crq8 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 390,400 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/DataDog/dd-trace-go🐹github.com/DataDog/dd-trace-go/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Datadog tracing libraries that implement W3C baggage propagation parse incoming baggage HTTP headers without enforcing item-count or byte-size limits on the extract path. The DD_TRACE_BAGGAGE_MAX_ITEMS (default 64) and DD_TRACE_BAGGAGE_MAX_BYTES (default 8192) limits were applied only to baggage injection, not extraction. A remote, unauthenticated attacker can send a request whose baggage header contains an arbitrarily large number of comma-separated key-value pairs (or a single very large value). The tracer allocates a hash-map entry for each pair on every request, causing unbounded CPU and memory consumption and enabling a remote Denial of Service against any HTTP service that has the baggage propagation style enabled. The baggage propagation style is enabled by default in most affected tracers, so any internet-facing service that has been instrumented with an affected tracer version is exposed unless the propagation style has been explicitly narrowed.
Patches
This is resolved in version 2.8.1 and later of the dd-trace-go library.
Workarounds
If users cannot upgrade immediately:
- Disable
baggageextraction by removingbaggagefromDD_TRACE_PROPAGATION_STYLE(orDD_TRACE_PROPAGATION_STYLE_EXTRACTif set independently). - Cap the maximum HTTP request header size at an upstream proxy or web server (for example, Apache
LimitRequestFieldSize, Nginxlarge_client_header_buffers, Envoymax_request_headers_kb).
Resources
Related upstream advisories: opentelemetry-go GHSA-mh2q-q3fh-2475 opentelemetry-dotnet GHSA-g94r-2vxg-569j
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/DataDog/dd-trace-go | all versions | No fix |
| 🐹Go | github.com/DataDog/dd-trace-go/v2 | all versions | 2.8.1go get github.com/DataDog/dd-trace-go/v2@v2.8.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/DataDog/dd-trace-go, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
No patched version of github.com/DataDog/dd-trace-go has shipped for GHSA-74j5-xf3v-crq8 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Advanced Cluster Management for Kubernetes and OpenShift Container Platform 4.21+ ship versions of the Datadog dd-trace-go v2 library prior to v2.8.1 that are vulnerable to this denial-of-service flaw in W3C baggage header parsing. OpenShift Container Platform 4.12 through 4.20 ships dd-trace-go v1, which does…
If Datadog APM tracing with W3C baggage propagation is enabled, disable the baggage propagator by setting the DD_TRACE_PROPAGATION_STYLE environment variable to exclude 'baggage'.Source: Red Hat security advisory for GHSA-74j5-xf3v-crq8 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-74j5-xf3v-crq8 in your dependencies?
Find it across Go, including transitive dependencies.