VDB
Sign up
MEDIUM5.3

PYSEC-2026-214

Quick fix

PYSEC-2026-214 — daphne: upgrade to the fixed version with the command below.

pip install --upgrade 'daphne>=4.2.2'

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/daphne
Introduced in: 0Fixed in: 4.2.2
Fixpip install --upgrade 'daphne>=4.2.2'

References