chore(deps): update dependency twisted to v26 [security]#348
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency twisted to v26 [security]#348renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
c622c57 to
448d675
Compare
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.
This PR contains the following updates:
25.5.0→26.4.0Twisted has a Denial of Service (DoS) in twisted.names via Crafted DNS Compression Pointer Chains
CVE-2026-42304 / GHSA-grgv-6hw6-v9g4
More information
Details
Details
The twisted.names module is vulnerable to a Denial of Service (DoS) attack via resource exhaustion during DNS name decompression. A remote, unauthenticated attacker can exploit this by sending a crafted TCP DNS packet containing deeply chained compression pointers. This flaw bypasses previous loop-prevention logic, causing the single-threaded Twisted reactor to hang while processing millions of recursive lookups, effectively freezing the server.
Technical Details
The main issue is in twisted.names.dns.Name.decode. A visited set was added in 2011 (commit e11cd82) to prevent infinite loops, but there is still no limit on the number of pointer dereferences per message. Also, the visited set is reset for each Question record.
Because DNSServerFactory handles every record in QDCOUNT without checking them, an attacker can add thousands of questions that all refer to the same long chain of pointers. This makes the parser repeat a complex and unnecessary search.
PoC
Impact
A single malformed TCP packet is sufficient to block the Twisted reactor's event loop for several seconds. Because Twisted operates on a single-threaded cooperative multitasking model, this is a common Denial of Service (DoS). The process becomes unable to handle new connections, process I/O, or respond to existing requests, effectively paralyzing the server for the duration of the decompression.
Remediation
Resources
https://cwe.mitre.org/data/definitions/400.html
https://cwe.mitre.org/data/definitions/407.html
https://datatracker.ietf.org/doc/html/rfc9267
https://github.com/twisted/twisted/blob/trunk/src/twisted/names/dns.py#L595
twisted/twisted@e11cd82
Author: Tomas Illuminati
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
twisted/twisted (Twisted)
v26.4.0: Twisted 26.4.0Compare Source
Twisted 26.4.0 (2026-05-11)
This is the last release with support for Python 3.9.
Security
Reported and fixed by Tomas Illuminati Balbin CVE-2026-42304 (#12626)
Features
tlsendpointtype, which allows you to do
twist web --listen=tls:.../certbot-dir/config/livepointed at a certbot liveconfiguration directory and have your certbot certificates automatically
discovered and served appropriately. (#9885)
twisted.internet.reactornow has type annotations and will appear to be an object of an appropriate type, allowing for idiomatic common usages with correct type information. (#9909)applicationproperty from these new key types. (#12212)Bugfixes
using twisted.internet.defer.inlineCallbacks was removed. (#12120)
RuntimeWarning: TestResult has no addDuration methodwhen running PyUnit tests. (#12229)sys.modulesgracefully. Prior to the change, it could possibly raise a "dictionary changed size during iteration" error if the module list changed. (#12458)factorfor initial delay, but useinitialDelaydirectly. (#12478)twisted.internet.testing.MemoryReactor.callWhenRunningnow invokes the callback immediately, if already started. (#12514)Improved Documentation
Deprecations and Removals
twisted.protocols.tls. (#9588)
Misc
Conch
Web
Mail
No significant changes.
Words
No significant changes.
Names
Bugfixes
Trial
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.