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

CVE-2026-116693: dd-trace: ReDOS in URL query string obfuscation

highCVSS 4.0 8.7GHSA-x94g-w73q-hpcw

The default query-string obfuscation regex in the Datadog Node.js tracer `dd-trace` backtracks badly on crafted URLs. A remote attacker can stall a Node.js service's event loop with one request. Upgrade to 5.131.1 or 6.20.1.

Published Oct 27, 2026 · Analysis Nov 1, 2026

What an attacker can do

When an HTTP integration records URL metadata on a span, dd-trace runs a regex over the query string to hide secrets such as passwords and tokens. The default pattern, set by DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP, can backtrack excessively on certain input. It runs synchronously, so a single slow match blocks the Node.js event loop. Every other request on that process waits.

The attacker needs only network access to an endpoint that is traced. No login or user action is needed. The CVSS 4.0 vector shows high availability impact and none for confidentiality or integrity. The advisory states the processing is on by default for affected HTTP integrations that include query strings in URL span tags. The advisory withholds the triggering input. Result: high CPU, long request latency and an unavailable service, for any app that has the tracer loaded.

Who is affected

Affected: dd-trace from 2.0.0 up to but not including 5.131.1, and from 6.0.0 up to but not including 6.20.1. Check the installed version:

npm ls dd-trace

Apps that load the tracer and use an HTTP integration with the default obfuscation regex are exposed. A custom DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP replaces the default pattern. The advisory does not say whether custom patterns are safe.

dd-trace

Ecosystem
npm
Affected
>= 2.0.0, < 5.131.1
Fixed in
5.131.1
Check
npm ls dd-trace

dd-trace

Ecosystem
npm
Affected
>= 6.0.0, < 6.20.1
Fixed in
6.20.1
Check
npm ls dd-trace

How to fix it

Upgrade to 5.131.1 on the 5.x line or 6.20.1 on the 6.x line:

npm install [email protected]

Restart the service afterwards. The pull request updates the default DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP.

If you cannot upgrade yet, the advisory gives a workaround: set DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP to the replacement pattern printed in the advisory, then restart the application. Copy it exactly from the advisory.

How to tell if you were hit

Look for Node.js processes pinned at high CPU with slow or timing-out responses. Check access logs for requests with unusually long or repetitive query strings. Event-loop lag metrics will spike during an attack. Compare against your APM latency graphs. The advisory lists no log line, and the trigger input is not public.

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 DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP to the fixed regex below, then restart the application.

DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP='(?:(?:"|%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._-]+)?)'

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

Do I need to be using Datadog APM to be affected?

The flaw sits in the dd-trace library. The app must load the tracer with an HTTP integration that puts query strings in URL span tags. That is the default for affected integrations, per the advisory.

Is there a workaround besides upgrading?

Yes. Set DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP to the fixed regex given in the advisory and restart. Upgrading to 5.131.1 or 6.20.1 is the real fix.

Can this lead to code execution or data theft?

No. The advisory describes regular expression denial of service only: CPU exhaustion, latency and unavailability. The CVSS 4.0 vector rates confidentiality and integrity impact as none.

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 npm vulnerabilities

All npm entries