Executive brief
Mongoose is an embedded web server library used in many applications and devices. An attacker can exploit improper HTTP protocol detection to smuggle requests through reverse proxies, potentially gaining unauthorized access to backend systems or modifying application state. This requires the application to be deployed behind an HTTP/1.0 reverse proxy and does not require authentication.
Technical details
This is an HTTP request smuggling vulnerability (CWE-444) in Mongoose versions prior to 7.22. The http_cb() function in src/http.c contains a logic error where it tests hm.proto.len with an impossible greater-than-eight condition, even though mg_http_parse() enforces exactly eight-byte protocol strings. As a result, is_http_1_0 is never set to true. A remote unauthenticated attacker can send a crafted HTTP request with Transfer-Encoding: chunked and conflicting framing to exploit this flaw. Because Mongoose incorrectly processes chunked encoding that an HTTP/1.0 reverse proxy would ignore, the attacker can smuggle requests past the proxy, leading to request confusion and potential unauthorized access or state modification. The vulnerability is fixed in version 7.22.
Affected products
- Cesanta Mongoose prior to 7.22
Timeline
- 2026-08-20: disclosed
- 2026-06-23: patched: Version 7.22 fixes the issue