Vulnerability · Published Feb 14, 2023 · Assigned by GitHub_M

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

Low 2.6

In plain English

A low-severity improper input validation in werkzeug from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)2.6Low
Exploit odds (30 days)0.5%top 56.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-werkzeug2.2.2-3DEBIAN-CVE-2023-23934
Debian:13python-werkzeug2.2.2-3DEBIAN-CVE-2023-23934
Debian:14python-werkzeug2.2.2-3DEBIAN-CVE-2023-23934
PyPIwerkzeug2.2.3GHSA-px8h-6qxv-m22q
PyPIwerkzeug2.2.3PYSEC-2023-57
Ubuntu:22.04:LTSpython-werkzeug2.0.2+dfsg1-1ubuntu0.22.04.1USN-5948-1
Ubuntu:22.04:LTSpython-werkzeug2.0.2+dfsg1-1ubuntu0.22.04.1UBUNTU-CVE-2023-23934

Affected products (as reported)

VendorProductVersions
pallets werkzeug < 2.2.3

Weakness: CWE-20 · Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N

References