# GHSA-8r99-h8j2-rw64: Twisted vulnerable to HTTP Request Smuggling Attacks

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-10-07T07:31:33.000Z
- Modified: 2024-11-30T05:35:16.690Z

## Description

### 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

(As written by GitHub Advisory Database.)

## Affected

- twisted (PyPI): before 20.3.0

## References

- <https://github.com/twisted/twisted/security/advisories/GHSA-8r99-h8j2-rw64> (web)
- <https://github.com/twisted/twisted/commit/20c787a14a09e7cbd5dfd8df08ceff00d1fcc081> (web)
- <https://github.com/twisted/twisted/commit/4a7d22e490bb8ff836892cc99a1f54b85ccb0281> (web)
- <https://github.com/twisted/twisted> (package)

## Sources

- GitHub Advisory Database: [GHSA-8r99-h8j2-rw64](https://github.com/advisories/GHSA-8r99-h8j2-rw64), CC-BY-4.0, modified 2024-11-30

---

Page: https://cve.day/GHSA-8r99-h8j2-rw64 · Whole record: https://cve.day/GHSA-8r99-h8j2-rw64.json · Rebuilt by cve.day 2026-11-25T22:56:34.703Z
