NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2026-116588: Datadog dd-trace-py: ReDoS in URL query string obfuscation

highCVSS 4.0 8.7GHSA-3633-r77q-h3v3

Datadog's Python tracer ddtrace uses a default regular expression to obfuscate secrets in URL query strings, and that pattern can backtrack heavily on crafted input. An attacker who sends such a query string to an instrumented web app can stall request handling. Fixed in ddtrace 3.19.9 and 4.15.6.

Published Oct 27, 2026 · Analysis Nov 1, 2026

What an attacker can do

When an HTTP integration records URL metadata, ddtrace runs the query-string obfuscation pattern synchronously, in the application's own request path. The default pattern can exhibit excessive backtracking. A crafted query string ties up the thread or event loop that handles the request, which raises latency for other requests and can make the service unavailable. The advisory omits the triggering inputs.

The attacker needs only network access to a web endpoint the tracer instruments. No login or user interaction is needed. The vulnerable processing is on by default for HTTP integrations that include query strings in URL span tags. The CVSS 4.0 vector shows high availability impact on the vulnerable system and nothing else. No data is exposed.

The tracer sits inside the application process, so one slow regex run blocks real work. A handful of requests can saturate workers behind a load balancer, and it affects any framework the tracer wraps, not one product.

Who is affected

The package data lists ddtrace from 1.5.0 up to but not including 3.19.9, and from 4.0.0 up to but not including 4.15.6. You are exposed if an instrumented web or HTTP integration records query strings in URL span tags, which is the default.

pip show ddtrace
pip list | grep ddtrace

Check every service image, since tracer versions often differ between services.

ddtrace

Ecosystem
PyPI
Affected
>= 1.5.0, < 3.19.9
Fixed in
3.19.9
Check
pip show ddtrace

ddtrace

Ecosystem
PyPI
Affected
>= 4.0.0, < 4.15.6
Fixed in
4.15.6
Check
pip show ddtrace

How to fix it

Upgrade to ddtrace 3.19.9 on the 3.x line, or 4.15.6 on the 4.x line.

pip install --upgrade "ddtrace>=4.15.6"

The 4.15.6 release notes say only that they fix a security vulnerability described in the advisory. The advisory also gives a workaround. Set both DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP and DD_TRACE_OBFUSCATION_QUERY_STRING_PATTERN to the fixed Python-compatible regex printed in the advisory, then restart the application. Setting both covers all affected versions, including those before 1.19.0. Copy the pattern from the advisory exactly.

How to tell if you were hit

Look for request latency spikes and worker CPU saturation in traced services, with access logs showing long or odd query strings on a few endpoints. A CPU profile or stack dump from a stuck worker shows time in the re module called from ddtrace's HTTP URL tagging code. Check dependency lockfiles and container images for ddtrace below 3.19.9 or between 4.0.0 and 4.15.5. Check whether the two obfuscation environment variables are set to the advisory's pattern.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A regular expression used to obfuscate URL query strings can consume excessive CPU when processing certain attacker-controlled input. This can stall request processing and cause denial of service in applications using affected HTTP tracing integrations.

Details

The default query-string obfuscation pattern can exhibit excessive backtracking. The pattern is applied synchronously when recording HTTP URL metadata, allowing query-string processing to occupy application resources for an extended period.

As a workaround, set both DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP and DD_TRACE_OBFUSCATION_QUERY_STRING_PATTERN to the fixed Python-compatible regex below, then restart the application. Setting both variables covers all affected ddtrace versions, including releases before 1.19.0.

export DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP='(?i)(?:(?:"|%22)?)(?:(?:old[-_]?|new[-_]?)?p(?:ass)?w(?:or)?d(?:1|2)?|pass(?:[-_]?phrase)?|secret|(?:api[-_]?|private[-_]?|public[-_]?|access[-_]?|secret[-_]?|app(?:lication)?[-_]?)key(?:[-_]?id)?|token|consumer[-_]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\s|%20)*(?:=|%3D)[^&]+|(?:"|%22)(?:\s|%20)*(?::|%3A)(?:\s|%20)*(?:"|%22)(?:%2[^2]|%[^2]|[^"%])+(?:"|%22))|(?:bearer(?:\s|%20)+[a-z0-9._\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|(?:(?<![\w-])|(?<=%[0-9a-f]{2}))ey[I-L][\w-]+(?:=|%3D)*\.ey[I-L][\w-]+(?:=|%3D)*(?:\.(?:[\w.+/=-]|%3D|%2F|%2B)+)?|-{5}BEGIN(?:[a-z\s]|%20)+PRIVATE(?:\s|%20)KEY-{5}[^\-]+-{5}END(?:[a-z\s]|%20)+PRIVATE(?:\s|%20)KEY(?:-{5})?(?:\n|%0A)?|(?:ssh-(?:rsa|dss)|ecdsa-[a-z0-9]+-[a-z0-9]+)(?:\s|%20|%09)+(?:[a-z0-9/.+]|%2F|%5C|%2B){100,}(?:=|%3D)*(?:(?:\s|%20|%09)+[a-z0-9._-]+)?)'

export DD_TRACE_OBFUSCATION_QUERY_STRING_PATTERN="$DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP"

Proof of concept

Detailed triggering inputs and reproduction steps are omitted from this advisory. The patched version includes regression coverage for the affected behavior.

Impact

Regular expression denial of service (ReDoS) affecting applications that process attacker-controlled URL query strings through the vulnerable obfuscation pattern. Successful exploitation can cause excessive CPU consumption, prolonged request latency, and service unavailability.

The vulnerable processing is enabled by default for affected HTTP integrations that include query strings in URL span tags.

Questions

Is ddtrace affected by default?

Yes. The advisory says the vulnerable obfuscation runs by default for affected HTTP integrations that include query strings in URL span tags.

Which ddtrace versions fix CVE-2026-116588?

3.19.9 for the 3.x line and 4.15.6 for the 4.x line. Versions from 1.5.0 up to those releases are listed as vulnerable.

Is there a workaround if I cannot upgrade now?

Yes. Set both DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP and DD_TRACE_OBFUSCATION_QUERY_STRING_PATTERN to the fixed regex given in the advisory, then restart the application.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More PyPI vulnerabilities

All PyPI entries