Description
daphne before 4.2.2 reconstructs a raw HTTP request from Twisted's parsed headers and feeds it to autobahn for WebSocket handshake processing. Twisted does not treat \x0b, \x0c, \x1c, \x1d, \x1e, or \x85 as header line separators, but autobahn decodes header values to str and calls splitlines(). An attacker can exploit this parser differential to inject additional headers into the ASGI scope passed to the application. daphne now rejects requests with these bytes in any header value with a 400 response.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | daphne | 4.2.0 – ≤ 4.2.1 | 4.2.2 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-daphne | 4.2.2-0.1 | — |
| Debian 13 | python-daphne | 4.1.2-2+deb13u1 | — |
| Debian 12 | python-daphne | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-daphne | No fix yet | — |
| Ubuntu 26.04 LTS | python-daphne | No fix yet | — |
| Ubuntu 25.10 | python-daphne | No fix yet | — |
| Ubuntu 24.04 LTS | python-daphne | No fix yet | — |
| Ubuntu 22.04 LTS | python-daphne | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | python-daphne | No fix yet | — |
| Ubuntu 18.04 LTS | python-daphne | No fix yet | — |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-daphne | 4.2.3-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | daphne | < 4.2.2 | 4.2.2 | GHSA-xh68-hfp5-5x5m |
References
- https://github.com/django/daphne/blob/main/CHANGELOG.txt release-notes