CVE-2026-124249
http.cookiejar.CookieJar deleted a stored cookie when a response carried an already expired Set-Cookie header for it, using the Domain and Path attributes from…
Impact
http.cookiejar.CookieJar deleted a stored cookie when a response carried an already expired Set-Cookie header for it, using the Domain and Path attributes from the header without consulting the cookie policy. A server could therefore delete cookies belonging to other domains from a shared cookie jar, such as the one used by urllib's HTTPCookieProcessor. The fix consults the cookie policy before an expired cookie may delete an existing one, as required by RFC 6265 section 5.3.
An attacker can exploit this over the network, without logging in, without any action by a user. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of data or systems being changed.
Affected products · Python Software Foundation
| Product | Affected versions |
|---|---|
| CPython | before 3.16.0 before 3.16.0a2 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/python/cpython/pull/161570
- https://github.com/python/cpython/issues/161569
- https://mail.python.org/archives/list/security-announce@python.org/thread/Y6IKNZ2VZUS2L6CLQICSFUEMCLT7OLTY/
- https://github.com/advisories/GHSA-chc2-vx2q-cwqf
- https://nvd.nist.gov/vuln/detail/CVE-2026-124249
- https://mail.python.org/archives/list/security-announce@python.org/thread/Y6IKNZ2VZUS2L6CLQICSFUEMCLT7OLTY
- http://www.openwall.com/lists/oss-security/2026/11/09/24
- https://github.com/python/cpython/commit/4e9d037f1cfc8e29efcb1f67bc668e06ff2b6643
- https://github.com/python/cpython/commit/8eb3d2c1c41ca7ce628554413981c1eb763a1494
- https://github.com/python/cpython/commit/ac1d49f4fbb33941475c5aa3cb663ab39d64cb73