Repository navigation
Bump ddtrace from 2.19.0 to 4.15.6 - #153
Open
superbot-helper wants to merge 1 commit into
Open
superbot-helper wants to merge 1 commit into
superbot-helper wants to merge 1 commit into
Conversation
GHSA-3633-r77q-h3v3 (CVE-2026-116588): ddtrace's default query-string obfuscation pattern backtracks quadratically over a query string built from repeated eyI tokens. With the Flask instrumentation installed, every request runs that pattern over the raw query string before the app routes it: a 60,000-byte query string takes 12.817 s in redact_query_string as opposed to 0.0240 s for a same-size benign one, while a 6,000-byte one takes 0.1396 s and a 24,000-byte one 2.0849 s. 4.15.6 is the pin rather than 3.19.9 because 3.19.9 still carries GHSA-p3m5-h5v9-vqj6 (>=3.13.0, <4.15.5); 4.15.6 is outside both ranges. requirements.txt only; no source changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates ddtrace from 2.19.0 to 4.15.6.
Fixes GHSA-3633-r77q-h3v3 and CVE-2026-116588 — one query string holds the request worker for 12.817 seconds: a 60,000-byte query string costs 12.817 s (median of three) on the pinned 2.19.0 and 0.0264 s on the patched 4.15.6 through the same served route, while a same-size benign query string costs 0.0240 s and 0.0259 s respectively; the attacker controls both the length and the number of
eyItokens, so a handful of concurrent requests stall every worker.This bump also closes
GHSA-p3m5-h5v9-vqj6(dd-trace-py IAST can terminate the application process, range >=3.13.0, <4.15.5), which the ReDoS advisory's minimal 3.x patched release 3.19.9 still carries, so the pin moves to 4.15.6 on the 4.x line, outside both ranges.What this changes:
requirements.txt—ddtracemoves from 2.19.0 to 4.15.6 on line 7; no other package or line changesHow to verify:
Why the query string is exposed
csvbase/web/app.py:112callsdatadog.configure_datadog();csvbase/datadog.py:11importsddtrace.autowhenenable_datadogis true, which installs ddtrace's Flask/WSGI instrumentation (ddtrace/contrib/internal/flask/patch.py:368).Every request then goes through
ddtrace/_trace/trace_handlers.py:158 _on_request_prepare->ddtrace/contrib/trace_utils.py:428 set_http_meta->:412 _set_url_tag->ddtrace/internal/utils/http.py:83 redact_url->:77 redact_query_string, which runs the obfuscation regex fromddtrace/settings/config.py:56-88over the rawQUERY_STRINGbefore the app routes the request.In 2.19.0 the JWT branch of that regex,
ey[I-L](?:[\w=-]|%3D)+\.ey[I-L](?:[\w=-]|%3D)+, retries its trailing(?:[\w=-]|%3D)+from every one of the manyeyIstarts in the query string, so the total work is quadratic in the query-string length. The fixed releases replace it with(^|[^\w%-]|%[0-9a-f]{2})ey[I-L][\w-]+(?:=|%3D)*\.ey[I-L][\w-]+..., which consumes each token once.The same 60,000 bytes through the same route
eyItokens (60,000 B), median of 3a=+ 59,998a(60,000 B), median of 3eyItokens (24,000 B)eyItokens (6,000 B)requirements.txtwith the repository's ownpip install -r requirements.txtin a clean virtualenv and served the same way; the served command is the repository's ownflask runtarget withenable_datadog=true.Tracing only runs when
enable_datadogis set (csvbase/datadog.py:7-13), and gunicorn's default--limit-request-lineof 4094 bytes caps a single request at roughly 0.05 s unless it is raised, so the 12.817 s figure is the repository's ownflask runtarget with no request-line cap, and the patched requirements.txt was installed withpip install -r requirements.txtin a clean virtualenv before submission (exit 0, ddtrace 4.15.6).Automated security patch from Superbot.