MediumGHSA-8r99-h8j2-rw64

Twisted vulnerable to HTTP Request Smuggling Attacks

Published 7 Oct 2022 · Updated 30 Nov 2024

Is your project on an affected twisted?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<20.3.0
Fixed in
20.3.0
Update to the fixed version for your release line, for example:pip install 'twisted>=20.3.0'

Details

Impact

Twisted Web is vulnerable to request smuggling attacks:

1. "When presented with two content-length headers, Twisted Web ignored the first header. When the second content-length was set to zero this caused Twisted Web to interpret the request body as a pipelined request. According to RFC 7230 Section 3.3.3#4, if a message is received with multiple content-length headers with differing value, then the server must reject the message with a 400 response." (Jake Miller of Bishop Fox Security) 2. " When presented with a content-length and a chunked encoding header, the content-length took precedence and the remainder of the request body was interpreted by Twisted Web as a pipelined request. According to RFC 7230 Section 3.3.3#3, if a message with both content-length and chunked encoding is accepted, transfer-encoding overrides the content-length." (Jake Miller of Bishop Fox Security) 3. ~"Twisted should not allow BWS between the filed-name and colon." (ZeddYu Lu)~ _closed in 9646_ 4. "Two CL header with different values is also not allowed." (ZeddYu Lu) 5. "Only accept identity and chunked Transport-Encoding." (ZeddYu Lu)

Patches

https://github.com/twisted/twisted/commit/20c787a14a09e7cbd5dfd8df08ceff00d1fcc081 https://github.com/twisted/twisted/commit/4a7d22e490bb8ff836892cc99a1f54b85ccb0281

Workarounds

N/A

References

https://portswigger.net/web-security/request-smuggling

Is GHSA-8r99-h8j2-rw64 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected twisted, and gives you the command that fixes it.

More advisories for twisted

  • HighGHSA-vpp8-g58w-m8mpTwisted: Unauthenticated Remote Denial of Service in the Twisted HTTP/2 Server via Rapid Stream Reset · 29 Oct 2026
  • LowCVE-2026-83813Twisted: DNS Response Spoofing in twisted.names Due to Missing Source Address Validation · 27 Oct 2026
  • MediumCVE-2026-115774Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH · 23 Oct 2026
  • HighCVE-2026-115776Twisted: Unauthenticated Remote Denial of Service in the Twisted IRC Server via an Unbounded Line Buffer · 23 Oct 2026
  • HighCVE-2026-115778Twisted: Unauthenticated Remote Denial of Service in the Twisted conch Telnet Transport via an Unbounded Subnegotiation Buffer · 23 Oct 2026
  • HighCVE-2026-115775Twisted: Unauthenticated Remote Denial of Service in the Twisted words domish XML Element Stream via an Unbounded Element Tree · 23 Oct 2026
All 24 advisories for twisted

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.