Summary
A request-smuggling vulnerability in Mongoose can allow an unauthenticated remote attacker to send conflicting HTTP framing to deployments operating behind an HTTP/1.0 reverse proxy. Under those conditions, the server may process chunked encoding that the proxy does not recognize, potentially enabling unauthorized requests or state changes.
Affected context
The issue occurs in Mongoose deployments that use an HTTP/1.0 reverse proxy or intermediary in front of the embedded web server. It becomes risky when the proxy and origin server interpret Transfer-Encoding and message framing differently, allowing a request to be parsed inconsistently across the request path.
Exploit preconditions
- Attack surface: Network-accessible HTTP service behind an HTTP/1.0
reverse proxy
- Required access: No authentication may be required if the service is
publicly reachable
- Trigger point: Processing an HTTP request with chunked transfer encoding
and conflicting framing
- Why exploitation is possible: Mongoose may fail to recognize the
HTTP/1.0 context and process chunked encoding that the intermediary can
ignore, creating inconsistent request boundaries
Why this happens
The root cause is inconsistent HTTP protocol and message-framing interpretation between the reverse proxy and Mongoose. In http_cb(), a length comparison intended to identify HTTP/1.0 is impossible because the parser requires an eight-byte protocol string, while the condition tests for a length greater than eight. As a result, the HTTP/1.0 handling path is not selected, and chunked requests can be interpreted differently by the proxy and origin server. This behavior maps to CWE-444, HTTP Request Smuggling.
Potential impact
- An attacker may bypass proxy-level request controls
- Unauthorized backend requests could be processed
- Protected application endpoints may be reached indirectly
- Application state could be changed without the intended authorization flow
- Session, routing, or audit assumptions may be undermined
- Downstream systems could receive requests that the proxy did not interpret
General mitigation guidance
Mitigation generally focuses on enforcing consistent HTTP parsing across every intermediary and origin server. Secure-by-default deployments can disable ambiguous transfer-encoding combinations, reject conflicting framing, and normalize or remove unsupported HTTP features at trusted boundaries. Reverse proxies and backends should share an explicit protocol policy, while applications should avoid relying solely on proxy-layer filtering for authorization. Least-privilege service identities and narrowly scoped backend permissions can reduce the consequences if request interpretation is bypassed.
How teams detect issues like this
Detection can include static analysis and code review for protocol parsing branches that compare incompatible length values or handle Transfer-Encoding inconsistently. Security testing can compare proxy and backend interpretations of requests with conflicting framing, while policy enforcement can reject ambiguous HTTP messages at ingress. Logs from proxies and origin servers can be correlated for mismatched request counts, unexpected backend paths, or requests that appear only in one layer. Automated security review tools may help identify risky parser and reverse-proxy configurations.

