CVE-2022-23959

9.1 CRITICAL

📋 TL;DR

This CVE describes an HTTP request smuggling vulnerability in Varnish Cache and Varnish Enterprise. Attackers can exploit this to bypass security controls, poison caches, or hijack user sessions. Organizations using affected versions of Varnish as HTTP reverse proxies are vulnerable.

💻 Affected Systems

Products:
  • Varnish Cache
  • Varnish Enterprise (Cache Plus)
Versions: Varnish Cache: before 6.6.2, 7.x before 7.0.2, 6.0 LTS before 6.0.10; Varnish Enterprise: 4.1.x before 4.1.11r6, 6.0.x before 6.0.9r4
Operating Systems: All platforms running affected Varnish versions
Default Config Vulnerable: ⚠️ Yes
Notes: Affects HTTP/1 connections only; HTTP/2 and HTTP/3 are not vulnerable. Requires Varnish to be configured as a reverse proxy handling HTTP traffic.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could poison caches with malicious content, hijack user sessions, bypass authentication, or perform web cache poisoning attacks affecting all downstream users.

🟠

Likely Case

Cache poisoning leading to users receiving malicious content, session hijacking, or bypassing security controls like WAFs and authentication mechanisms.

🟢

If Mitigated

Limited impact if Varnish is behind additional security layers or not exposed to untrusted traffic, though risk remains for cache poisoning.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires understanding of HTTP request smuggling techniques but tools exist. Attackers need to send specially crafted HTTP requests.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Varnish Cache: 6.6.2, 7.0.2, 6.0.10; Varnish Enterprise: 4.1.11r6, 6.0.9r4

Vendor Advisory: https://varnish-cache.org/security/VSV00008.html

Restart Required: Yes

Instructions:

1. Check current Varnish version. 2. Download and install patched version from official repositories. 3. Restart Varnish service. 4. Verify version is updated.

🔧 Temporary Workarounds

Disable HTTP/1 pipelining

linux

Configure Varnish to disable HTTP/1 pipelining which reduces request smuggling opportunities

varnishadm param.set feature +http1_pipeline 0

Use HTTP/2 or HTTP/3

all

Configure backend connections to use HTTP/2 or HTTP/3 protocols which are not vulnerable

🧯 If You Can't Patch

  • Implement WAF rules to detect and block HTTP request smuggling attempts
  • Place Varnish behind additional reverse proxies with request validation

🔍 How to Verify

Check if Vulnerable:

Check Varnish version with 'varnishd -V' and compare against affected versions

Check Version:

varnishd -V 2>&1 | grep -i varnish

Verify Fix Applied:

Verify version shows patched version after update and restart

📡 Detection & Monitoring

Log Indicators:

  • Multiple requests from single connection with unusual timing
  • Requests with conflicting Content-Length and Transfer-Encoding headers
  • Unexpected cache hits/misses patterns

Network Indicators:

  • HTTP requests with both Content-Length and Transfer-Encoding headers
  • Requests that appear to be two requests in one TCP connection

SIEM Query:

source="varnish" AND ("Content-Length" AND "Transfer-Encoding") OR "pipeline"

🔗 References

📤 Share & Export