CVE-2026-40395 Denial of service in Varnish Enterprise

Medium 4.0 Published Updated

Malicious clients can crash the Varnish Enterprise server via workspace overflow in shared VCL deployments, causing denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-40395?

CVE-2026-40395 is a medium-severity denial of service vulnerability in varnish-software Varnish Enterprise, published on 12 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Varnish Enterprise before 6.0.16r12 allows a "workspace overflow" denial of service (daemon panic) for shared VCL. The headerplus.write_req0() function from vmod_headerplus updates the underlying req0, which is normally the original read-only request from which req is derived (readable and writable from VCL). This is useful in the active VCL, after amending req, to prepare a refined req0 before switching to a different VCL with the return (vcl(<label>)) action. This is for example how the Varnish Controller operates shared VCL deployments. If the amended req contained too many header fields for req0, this would have resulted in a workspace overflow that would in turn trigger a panic and crash the Varnish Enterprise server. This could be used as a Denial of Service attack vector by malicious clients.

Weakness: CWE-770

Which versions are affected by CVE-2026-40395?

It affects 1 product.

Products include Varnish-Software Varnish Enterprise.

How do I fix CVE-2026-40395?

No fix has been published for CVE-2026-40395 yet. Limit exposure of the affected software until one is available.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-40395 being exploited?

There is no known exploitation of CVE-2026-40395 in the wild and no public exploit code.

Sources

Also known as GHSA-59jh-85v4-gxrf, UBUNTU-CVE-2026-40395.

Is CVE-2026-40395 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free