A client-side desync vulnerability can be triggered in Varnish Cache and Varnish Enterprise. This vulnerability can be triggered under specific circumstances involving malformed HTTP/1 requests.
Certain malformed HTTP/1 requests have been handled by issuing a 400 Bad Request
response, and then allowing the connection to carry on
with a subsequent request on that same connection. For the case where
the initial malformed request contains a request body, the body is not
properly processed and is instead treated as the basis for a
subsequent request. This can result in the client receiving a response
associated with the improperly embedded request as a response to a
subsequent request.
The malformed requests that can trigger this behavior are limited to the following cases:
Host
request headers.Content-Length
request headers.The vulnerability was discovered internally during a code review session and, to our knowledge, has not been exploited to date.
The primary risk of this vulnerability is enabling HTTP request smuggling attacks, which could have consequences for downstream systems. Specifically:
Cache Poisoning: A downstream cache positioned in front of Varnish could cache incorrect or malicious content if it allows the aforementioned malformed HTTP/1 requests to pass through unhandled. This can lead to unintended responses being served to users, potentially exposing sensitive information or delivering harmful payloads.
Security Risks: Bypass of WAF type products downstream from Varnish could be achieved if these products are configured to not inspect request bodies and in addition allow the aforementioned malformed HTTP/1 requests to pass through.
Given the pretty much complete absence of software products that allow the aforementioned malformed HTTP/1 requests to pass through to Varnish without failing the request itself, we find it extremely unlikely for a Varnish setup to be positioned in such a way that this vulnerability can be effectively abused.
The vulnerability has been given a severity rating of low.
The recommended solution is to upgrade Varnish to one of the versions where this issue has been resolved, and then ensure that Varnish is restarted.
2024-12-17
2024-12-18
2024-12-20
2025-01-07
2025-03-18