# CVE-2026-50271: Datadog dd-trace-py Denial of Service in W3C baggage parsing

Source: https://junglewise.ai/threats/cve-2026-50271-datadog-dd-trace-py-denial-of-service-in-w3c-baggage-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-17. Updated: 2026-07-17  
License: CC BY 4.0 with a link back

CVE-2026-50271 · Severity: high · CVSS 7.5 · Published 2026-07-17

Datadog dd-trace-py is a Python library used for monitoring and tracing application performance. A vulnerability in how it handles specific web request headers (W3C baggage) allows an unauthenticated attacker to crash the application or make it unresponsive by sending specially crafted, oversized headers. This can lead to a total service outage, impacting business operations and availability.

Technologies: [Datadog Dd-Trace-Py](https://junglewise.ai/threats/technologies/dd-trace-py), [ddtrace (PyPI)](https://junglewise.ai/threats/technologies/ddtrace). Vendors: [Datadog](https://junglewise.ai/threats/vendors/datadog), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-50271 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-50271 being exploited in the wild.

**How severe is CVE-2026-50271?** High severity, with a CVSS score of 7.5, published 17 July 2026.

**Which products and versions are affected?** Datadog Dd-Trace-Py < 4.8.2; ddtrace (PyPI) < 4.8.2, ECOSYSTEM:introduced=0,fixed=4.8.2.

**Is there a fix for CVE-2026-50271?** Yes. ddtrace (PyPI): upgrade to 4.8.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-50271 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-50271?** Check whether you run Datadog Dd-Trace-Py or ddtrace (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- ddtrace (PyPI): upgrade to 4.8.2 or later

  ```sh
  pip install "ddtrace>=4.8.2"
  ```


## Technical details

A resource exhaustion vulnerability (CWE-770) exists in the Datadog Python APM client (dd-trace-py) during the extraction of W3C baggage headers. While limits like DD_TRACE_BAGGAGE_MAX_ITEMS and DD_TRACE_BAGGAGE_MAX_BYTES were enforced during header injection, they were ignored during extraction. An unauthenticated remote attacker can exploit this by sending HTTP requests with excessively large baggage headers or a high volume of key-value pairs. This causes the tracer to perform unbounded memory allocation and CPU-intensive parsing, leading to a Denial of Service (DoS). The vulnerability is present in the default configuration where baggage propagation is enabled. It is fixed in version 4.8.2.

## Affected products

- Datadog dd-trace-py < 4.8.2

## Identifiers

- CVE-2026-50271
- GHSA-mw54-j2v2-42hr
- PYSEC-2026-3461

## Timeline

- 2026-05-06: patched: Fix merged into 4.8 branch and released in v4.8.2
- 2026-06-05: advisory: GitHub Security Advisory GHSA-mw54-j2v2-42hr published
- 2026-07-17: disclosed: CVE-2026-50271 published to NVD

## References

- [https://github.com/DataDog/dd-trace-py/commit/9c80faa3dcfe238d008c3b3cd0b8e5dfef0aa4cd](https://github.com/DataDog/dd-trace-py/commit/9c80faa3dcfe238d008c3b3cd0b8e5dfef0aa4cd)
- [https://github.com/DataDog/dd-trace-py/pull/17926](https://github.com/DataDog/dd-trace-py/pull/17926)
- [https://github.com/DataDog/dd-trace-py/releases/tag/v4.8.2](https://github.com/DataDog/dd-trace-py/releases/tag/v4.8.2)
- [https://github.com/DataDog/dd-trace-py/security/advisories/GHSA-mw54-j2v2-42hr](https://github.com/DataDog/dd-trace-py/security/advisories/GHSA-mw54-j2v2-42hr)

## Related threats

- [Datadog dd-trace-py process abort in IAST string formatting](https://junglewise.ai/threats/cve-2026-116589-datadog-dd-trace-py-is-the-datadog-python-apm-client-from-3-13-0)
- [Datadog dd-trace-py regex DoS in query-string obfuscation](https://junglewise.ai/threats/cve-2026-116588-datadog-dd-trace-py-is-the-datadog-python-apm-client-from-1-5-0)
