CVE-2023-23934 Wrkzeug's incorrect parsing of nameless cookies leads to __Host- cookies bypass

Low 2.6 Published Updated

Attackers can bypass __Host- cookie security restrictions via nameless cookies, allowing session fixation or hijacking in Werkzeug applications.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-23934?

CVE-2023-23934 is a low-severity vulnerability in pallets werkzeug, published on 14 Feb 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

Werkzeug is a comprehensive WSGI web application library. Browsers may allow "nameless" cookies that look like `=value` instead of `key=value`. A vulnerable browser may allow a compromised application on an adjacent subdomain to exploit this to set a cookie like `=__Host-test=bad` for another subdomain. Werkzeug prior to 2.2.3 will parse the cookie `=__Host-test=bad` as __Host-test=bad`. If a Werkzeug application is running next to a vulnerable or malicious subdomain which sets such a cookie using a vulnerable browser, the Werkzeug application will see the bad cookie value but the valid cookie key. The issue is fixed in Werkzeug 2.2.3.

Weakness: CWE-20

Which versions are affected by CVE-2023-23934?

3 open source packages ship an affected version, including werkzeug and Werkzeug. It affects 1 product.

PackageAffectedFixed in
werkzeug PyPIAll versions2.2.3
werkzeug PyPIAll versions2.2.3
Werkzeug PyPIAll versions2.2.3

Products include Palletsprojects Werkzeug.

How do I fix CVE-2023-23934?

Upgrade werkzeug to 2.2.3 or later.

Is CVE-2023-23934 being exploited?

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

Sources

Also known as AZL-13589, CLSA-2026-1772410266, DEBIAN-CVE-2023-23934, GHSA-px8h-6qxv-m22q, PYSEC-2023-57, UBUNTU-CVE-2023-23934.

Is CVE-2023-23934 in your software?

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

Check your SBOMs for free