CVE-2026-85078: sanic chunked trailer request smuggling allows hidden second request execution
Sanic’s HTTP/1.1 chunked-body handling does not fully consume the trailer-part after the terminating 0\r\n chunk. Because of that, attacker-controlled bytes left in the connection buffer after the first chunked request can be interpreted as the start of a new HTTP request on the same keep-alive connection. In the attached verified proof, a single outer POST / request that correctly returns 405 Method Not Allowed is followed, within the same TCP send, by a hidden second request smuggled through the chunked trailer area. Sanic parses and executes that second request as a real independent request.
The issue is a request-boundary integrity failure in Sanic’s core HTTP/1.1 parser. The verified impact is not speculative. The attached proof shows that one TCP payload produces two server responses: first the expected 405 for the outer POST /, then a separate 200 OK for a hidden GET /. A second exploit variant changes the hidden request path and receives a real 404 Not Found, proving that the hidden second request is not a hard-coded artifact but an actually routed backend request. A control case with a two-character trailer field name shifts the leftover bytes from GET to :GET, which changes the second response accordingly and confirms that the root cause is incorrect trailer consumption rather than legitimate pipelining.
References
- github.com/advisories/GHSA-wmj6-g64g-j7q5
- github.com/sanic-org/sanic/commit/47349d689d65fa1907977ac100e867894aeafb22
- github.com/sanic-org/sanic/commit/69a10d3b06babaa9e5f6d1af577364e9e53b6dea
- github.com/sanic-org/sanic/commit/a332796506c7c588b6930b02a8886e43eb8ea8d6
- github.com/sanic-org/sanic/pull/3164
- github.com/sanic-org/sanic/pull/3165
- github.com/sanic-org/sanic/releases/tag/v24.12.1
- github.com/sanic-org/sanic/releases/tag/v25.12.1
- github.com/sanic-org/sanic/security/advisories/GHSA-wmj6-g64g-j7q5
- nvd.nist.gov/vuln/detail/CVE-2026-85078
Code Behaviors & Features
Detect and mitigate CVE-2026-85078 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →