<div dir="ltr"><font face="monospace">VSV00011 Varnish HTTP/2 Request Forgery Vulnerability<br>=====================================================<br><br>Date: 2022-11-08<br><br>A request forgery attack can be performed on Varnish Cache servers that<br>have the HTTP/2 protocol turned on. An attacker may introduce characters<br>through the HTTP/2 pseudo-headers that are invalid in the context of an<br>HTTP/1 request line, causing the Varnish server to produce invalid HTTP/1<br>requests to the backend. This may in turn be used to successfully exploit<br>vulnerabilities in a server behind the Varnish server.<br><br>Versions affected<br>-----------------<br><br>* Varnish Cache releases 5.x, 6.x, 7.0.x, 7.1.0, 7.1.1, 7.2.0.<br><br>* Varnish Cache 6.0 LTS series up to and including 6.0.10.<br><br>* Varnish Cache Plus by Varnish Software 6.0.x up to and including 6.0.10r2.<br><br>Versions not affected<br>---------------------<br><br>* Varnish Cache 7.1.2 (released 2022-11-08)<br><br>* Varnish Cache 7.2.1 (released 2022-11-08)<br><br>* GitHub Varnish Cache master branch at commit 687ffb6452ba570778a83b6eb1df8ac1b31d9221<br><br>* Varnish Cache Plus by Varnish Software version 6.0.10r3.<br><br>Mitigation<br>----------<br><br>If upgrading Varnish is not possible, it is possible to mitigate the<br>problem by adding the following snippet at the beginning of the `vcl_recv`<br>VCL function::<br><br>  sub vcl_recv {<br>      if (req.url ~ "(^$)|[ \t]+" || req.method ~ "(^$)|[ \t]+") {<br>          return (synth(400));<br>      }<br>  }<br><br>This VCL statement would test if the VCL variables filled in from incoming<br>HTTP/2 pseudo-headers contains any of the problematic characters, and<br>answer with a 400 "Bad request" synthetic response if found.<br><br>Credits<br>-------<br><br>This problem was discovered and reported to us by Martin van Kervel<br>Smedshammer, Graduate Student at the University of Oslo. We wish to thank<br>him for the responsible disclosure.</font><br></div>