CVE-2023-23934 Wrkzeug's incorrect parsing of nameless cookies leads to __Host- cookies bypass
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.
| Package | Affected | Fixed in |
|---|---|---|
werkzeug PyPI | All versions | 2.2.3 |
werkzeug PyPI | All versions | 2.2.3 |
Werkzeug PyPI | All versions | 2.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.
Other vulnerabilities in pallets werkzeug
- CVE-2022-29361 Other in n/a
- CVE-2023-46136 Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning
- CVE-2023-25577 Werkzeug may allow high resource usage when parsing multipart form data with many fields
- CVE-2019-14322 Pallets Werkzeug vulnerable to Path Traversal
- CVE-2026-27199 Werkzeug safe_join() allows Windows special device names
Sources
Also known as AZL-13589, CLSA-2026-1772410266, DEBIAN-CVE-2023-23934, GHSA-px8h-6qxv-m22q, PYSEC-2023-57, UBUNTU-CVE-2023-23934.