Bug 2170243 (CVE-2023-23934) - CVE-2023-23934 python-werkzeug: cookie prefixed with = can shadow unprefixed cookie
Summary: CVE-2023-23934 python-werkzeug: cookie prefixed with = can shadow unprefixed ...
Keywords:
Status: NEW
Alias: CVE-2023-23934
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2170245 2170317 2254407 2170247 2170249 2170251 2170252 2170254 2170257 2170258 2170260 2170263 2170265 2170267 2170268 2170269 2170270 2170271
Blocks: 2169911
TreeView+ depends on / blocked
 
Reported: 2023-02-16 00:14 UTC by Anten Skrabec
Modified: 2023-12-13 19:17 UTC (History)
31 users (show)

Fixed In Version: python-werkzeug 2.2.3
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in python-werkzeug. Browsers may allow "nameless" cookies 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 for another subdomain. If a Werkzeug application is running next to a vulnerable or malicious subdomain that sets such a cookie using a vulnerable browser, the Werkzeug application will see the bad cookie value but the valid cookie key.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Anten Skrabec 2023-02-16 00:14:38 UTC
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 <= 2.2.2 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.

Comment 1 Anten Skrabec 2023-02-16 00:20:28 UTC
Created cascadia-code-fonts tracking bugs for this issue:

Affects: fedora-36 [bug 2170249]


Created jetbrains-mono-fonts tracking bugs for this issue:

Affects: fedora-36 [bug 2170251]


Created mingw-python-werkzeug tracking bugs for this issue:

Affects: fedora-all [bug 2170258]


Created mote tracking bugs for this issue:

Affects: epel-7 [bug 2170245]


Created ndiscover-exo-2-fonts tracking bugs for this issue:

Affects: fedora-37 [bug 2170260]


Created openstack-vitrage tracking bugs for this issue:

Affects: openstack-rdo [bug 2170265]


Created oraculum tracking bugs for this issue:

Affects: fedora-36 [bug 2170252]


Created python-flask-caching tracking bugs for this issue:

Affects: fedora-36 [bug 2170254]


Created python-tilestache tracking bugs for this issue:

Affects: fedora-36 [bug 2170257]


Created python-werkzeug tracking bugs for this issue:

Affects: fedora-all [bug 2170263]
Affects: openstack-rdo [bug 2170267]


Created python3-werkzeug tracking bugs for this issue:

Affects: epel-7 [bug 2170247]

Comment 5 Sandro Mani 2023-03-07 08:43:58 UTC
Patch: https://github.com/pallets/werkzeug/commit/cf275f42acad1b5950c50ffe8ef58fe62cdce028
Fixed in werkzeug-2.2.3


Note You need to log in before you can comment on or make changes to this bug.