CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-85078

CVE-2026-85078: HTTP Request Smuggling via Chunked Trailers in Sanic Core HTTP Parser

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 17, 2026·6 min read·41 visits

Executive Summary (TL;DR)

Sanic's HTTP/1.1 chunked parser fails to process or reject trailing headers after a zero-size chunk. Attackers can leverage this on keep-alive connections to smuggle subsequent HTTP requests, bypassing proxy security filters.

CVE-2026-85078 describes a critical request-boundary integrity vulnerability (HTTP Request Smuggling) in Sanic, an open-source high-performance Python web server and framework. The vulnerability exists within Sanic's core HTTP/1.1 chunked-body parser. Prior to the patched versions, when processing a chunked transfer-encoded request, Sanic's parser failed to fully consume or validate the trailer-part following the terminating zero-size chunk.

Vulnerability Overview

CVE-2026-85078 is a critical request-boundary integrity vulnerability (HTTP Request Smuggling) in Sanic, an open-source, high-performance Python web server and framework. The flaw is located within Sanic's core HTTP/1.1 chunked-body parser. Prior to the patched versions, Sanic failed to validate or consume the trailer-part of a chunked request.

When deployed behind intermediaries such as reverse proxies, load balancers, or CDNs, this parser defect allows an unauthenticated remote attacker to append a malicious payload inside the trailer section of the persistent TCP connection stream. Because keep-alive is active on the backend socket, Sanic incorrectly reads the unconsumed trailer bytes from the buffer and parses them as a brand-new, independent, and smuggled HTTP request.

This behavior breaks request-boundary integrity and provides a powerful request-smuggling primitive. The vulnerability is classified under CWE-444, which designates inconsistent interpretation of HTTP requests.

Root Cause Analysis

Under RFC 9112 Section 7.1, chunked transfer encoding allows a sender to transfer a message body as a series of chunks. A chunked body terminates with a chunk of size zero (0\r\n), followed by an optional trailer-part consisting of zero or more header fields, and concluding with an empty line. In vulnerable versions of Sanic, the parser logic inside sanic/http/http1.py handled the termination of chunked bodies under the assumption that no trailers would ever be appended.

Specifically, the vulnerable code deleted a fixed offset of 4 bytes (pos += 4) upon finding the terminal zero chunk, which assumed the immediate presence of \r\n\r\n. If the client transmitted trailer fields, those trailers followed the 0\r\n line. Because the parser deleted only up to pos, any trailing headers or payload bytes sent after the 0\r\n remained entirely unconsumed inside the stream buffer.

Since the underlying TCP connection used Connection: keep-alive, Sanic recycled the connection buffer for the next request. The event loop immediately read the leftover, unconsumed trailer bytes from the socket buffer and interpreted them as the start of a new, pipelined HTTP request. This discrepancy allows attackers to inject arbitrary requests that bypass proxy filters.

Code Analysis

The vulnerability was resolved by refactoring how the parser consumes and validates trailing data in sanic/http/http1.py. Rather than attempting to parse and store trailer headers, Sanic chooses the safest possible strategy: strictly rejecting any requests containing trailers and terminating the TCP connection immediately. This decision limits the attack surface without introducing complex parser state-machines.

Below is the comparison of the vulnerable and patched code blocks in sanic/http/http1.py under commit a332796506c7c588b6930b02a8886e43eb8ea8d6. The diff demonstrates how hardcoded offsets were replaced with explicit lookahead buffer checks. This ensures complete validation of trailing sequences before recycling the socket.

# Vulnerable Implementation
# Consume CRLF, chunk size 0 and the two CRLF that follow
pos += 4
# Might need to wait for the final CRLF
while len(buf) < pos:
    await self._receive_more()
del buf[:pos]
# Patched Implementation
# Consume the leading CRLF, the terminating size line and
# the CRLF that follows it.
del buf[: pos + 2]
 
# Only the empty line that ends the (empty) trailer section
# may follow. Wait for it to arrive.
while len(buf) < 2:
    await self._receive_more()
 
# Reject any trailer-part. Leaving trailer bytes in the
# buffer would let them be reparsed as a smuggled request on
# this keep-alive connection.
if buf[:2] != b"\r\n":
    self.keep_alive = False
    raise BadRequest("Bad chunked encoding")
 
# Consume the final empty line. Anything after it is a
# legitimately pipelined next request.
del buf[:2]

Exploitation Methodology

To exploit this vulnerability, an attacker must identify a Sanic server deployed behind an HTTP/1.1-compliant reverse proxy that forwards chunked requests verbatim or fails to strip trailers. The attacker crafts a request using Transfer-Encoding: chunked and specifies a persistent connection (Connection: keep-alive). Inside the HTTP request body, the attacker ends the chunked payload with 0\r\n and immediately appends a smuggled HTTP request starting in the trailer region.

The front-end proxy processes the incoming request. Since the proxy sees a single valid chunked POST request, it forwards the complete TCP payload to the Sanic backend. Sanic parses the first request, processes the chunks, and upon encountering the 0\r\n chunk, it deletes up to the hardcoded pos limit, considering the body fully read. It routes the first request to the application handler and returns a response.

The bytes after 0\r\n (representing the smuggled request) remain in Sanic's connection read buffer. Because Connection: keep-alive is enabled, Sanic returns to its read loop, detects bytes in the connection buffer, and parses them as a new incoming request. This smuggled request is processed directly by Sanic, bypassing any authentication checks or access controls configured at the proxy layer.

Impact Assessment

The concrete security impact of CVE-2026-85078 depends on the routing architecture and access controls configured on the front-end proxy. By smuggling an arbitrary request, an attacker can access administrative endpoints restricted at the proxy tier, bypass authentication controls, or retrieve sensitive metadata. If the proxy buffers and caches responses, the attacker can also perform web cache poisoning, associating a malicious response with a legitimate static asset.

The CVSS v3.1 base score is 6.5, with low impact on integrity and availability from a standalone perspective. However, when integrated into a complex infrastructure, the impact can escalate to unauthorized execution of administrative actions. The attack complexity is low, and no specialized privileges or user interactions are required.

Currently, the exploit status of this vulnerability is proof-of-concept. While no active exploitation in the wild has been cataloged by CISA, the simplicity of request-smuggling exploitation makes immediate mitigation crucial for internet-facing installations.

Mitigation & Remediation

The primary remediation is to upgrade Sanic to a non-vulnerable version. If operating on the v24 LTS branch, upgrade to v24.12.1 or later. If operating on the v25 LTS branch, upgrade to v25.12.1 or later. These versions terminate keep-alive connections when unexpected trailers are detected.

If immediate upgrading is not possible, the threat can be mitigated at the front-end proxy tier. Ensure the reverse proxy is configured to strictly normalize incoming requests and reject chunked headers with trailers, or force the proxy to buffer the request body completely. For instance, in Nginx, maintain the default request body buffering configuration (proxy_request_buffering on) and avoid passing raw chunked streams unless necessary.

Additionally, implementing strict protocol compliance checks on intermediate load balancers can drop any request containing invalid or unexpected headers. Security teams should also monitor application logs for unexpected 405 Method Not Allowed or 400 Bad Request errors, which may indicate failed or experimental smuggling attempts.

Official Patches

sanic-orgPull request applying HTTP/1.1 chunked validation patch to the v25 branch.
sanic-orgPull request applying HTTP/1.1 chunked validation patch to the v24 branch.

Fix Analysis (3)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Affected Systems

Sanic < 24.12.1Sanic 25.12.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
sanic
sanic-org
< 24.12.124.12.1
sanic
sanic-org
== 25.12.025.12.1
AttributeDetail
CWE IDCWE-444
Attack VectorNetwork (AV:N)
CVSS v3.1 Score6.5
Exploit StatusPoC (Proof-of-Concept)
KEV StatusNot Listed
RemediationUpgrade to Sanic 24.12.1 / 25.12.1

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1036Masquerading
Defense Evasion
T1572Protocol Tunneling
Defense Evasion
CWE-444
Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')

The product does not properly parse or validate various fields in an HTTP request, which can allow an attacker to smuggle requests to a backend server.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory details for GHSA-wmj6-g64g-j7q5 containing conceptual parser unit tests.

Vulnerability Timeline

Vulnerability discovered and patched in the Sanic main repository branch.
2026-05-31
CVE-2026-85078 officially published alongside advisory release.
2026-09-17

References & Sources

  • [1]GitHub Security Advisory GHSA-wmj6-g64g-j7q5
  • [2]CVE Registry Entry for CVE-2026-85078

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-118777
4.8

CVE-2026-118777: Prototype Pollution in Forge HTTP Client Cookie Management

CVE-2026-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-118775
3.7

CVE-2026-118775: ASN.1 OID First Arc Truncation and Ambiguity in node-forge

CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119194
7.5

CVE-2026-119194: Algorithmic Complexity Denial of Service in pyasn1 Schemaless ASN.1 Decoder

CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).

Alon Barad
Alon Barad
7 views•9 min read
•1 day ago•CVE-2026-119195
7.5

CVE-2026-119195: Quadratic-Time Denial of Service in pyasn1 BER/CER/DER Decoders

CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119197
7.5

CVE-2026-119197: Quadratic Algorithmic Complexity Denial of Service in pyasn1 REAL Mantissa Decoder

An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-119196
7.5

CVE-2026-119196: Quadratic CPU Consumption in pyasn1 Constructed BIT STRING Decoding

A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.

Alon Barad
Alon Barad
8 views•10 min read