CVE-2022-45060
varnish: Request Forgery Vulnerability
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · November 8, 2022
Updated · November 2, 2026
Description
An HTTP Request Forgery issue was discovered in Varnish Cache. An attacker may introduce characters through HTTP/2 pseudo-headers that are invalid in the context of an HTTP/1 request line, causing the Varnish server to produce invalid HTTP/1 requests to the backend. This could be used to exploit vulnerabilities in a server behind the Varnish server.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
The following mitigation can be applied under the impossibility of update the varnish package:
- Add the following snippet under vcl_recv VCL function at /etc/varnish/default.vcl
if (req.url ~ "(^$)|[ \t]+" || req.method ~ "(^$)|[ \t]+") {
return (synth(400));
}
- Restart the varnish service by running the following command as a privileged user:
systemctl restart varnish
The VCL script above will check by any invalid character or pseudo-header values and when found it will return a synthetic HTTP error code 400.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CWE-918 · Server-Side Request Forgery