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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-werkzeug | 2.2.2-3 | DEBIAN-CVE-2023-23934 |
| Debian:13 | python-werkzeug | 2.2.2-3 | DEBIAN-CVE-2023-23934 |
| Debian:14 | python-werkzeug | 2.2.2-3 | DEBIAN-CVE-2023-23934 |
| PyPI | werkzeug | 2.2.3 | GHSA-px8h-6qxv-m22q |
| PyPI | werkzeug | 2.2.3 | PYSEC-2023-57 |
| Ubuntu:22.04:LTS | python-werkzeug | 2.0.2+dfsg1-1ubuntu0.22.04.1 | USN-5948-1 |
| Ubuntu:22.04:LTS | python-werkzeug | 2.0.2+dfsg1-1ubuntu0.22.04.1 | UBUNTU-CVE-2023-23934 |
Affected products (as reported)
Weakness: CWE-20 · Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
References
- https://github.com/pallets/werkzeug/security/advisories/GHSA-px8h-6qxv-m22q x_refsource_CONFIRM
- https://github.com/pallets/werkzeug/commit/cf275f42acad1b5950c50ffe8ef58fe62cdce028 x_refsource_MISC
- https://github.com/pallets/werkzeug/releases/tag/2.2.3 x_refsource_MISC
- https://www.debian.org/security/2023/dsa-5470
- https://security.netapp.com/advisory/ntap-20230818-0003/