CVE-2022-38150
varnish: denial of service via colon-starting reason phrase
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 9, 2022
Updated · November 21, 2025
Description
A flaw was found in Varnish where a denial of service attack can be performed against Varnish Cache servers by specially formatting the reason phrase of the backend response status line. To execute an attack, the attacker needs the ability to influence the HTTP/1 responses that the Varnish Server receives from its configured backends, causing the Varnish Server to assert and automatically restart.
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
As mentioned in the upstream security advisory, If upgrading Varnish is not possible, it is possible to mitigate the problem by adding the following snippet at the beginning of the vcl_backend_response VCL function:
sub vcl_backend_response {
set beresp.status = beresp.status;
}
By setting the status code to itself as described above, the reason field will automatically be reset to the standard value for the given status code, or “Unknown HTTP Status” if no standard value exists for that code. This would overwrite any existing attack content in the reason field.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE-20 · Improper Input Validation