CPython http.cookiejar can delete other domains' cookies
Python rates CVE-2026-124249 medium: an expired Set-Cookie can remove cookies that belong to other domains.
Cross-domain cookie deletion in CPython http.cookiejar
CPython's http.cookiejar.CookieJar deleted a stored cookie when a response carried an already expired Set-Cookie, using Domain and Path from the header without consulting the cookie policy. A server the client contacts can trigger this over the network with no authentication or user interaction, removing cookies for other domains from a shared jar such as urllib's HTTPCookieProcessor. The attacker gains deletion of those cookies. Users of a shared CookieJar are affected; affected builds are not listed.
What to do: Apply the CPython update for CVE-2026-124249 so the cookie policy is checked before an expired Set-Cookie can delete a stored cookie.
| Product | Affected |
|---|---|
| Python CPython | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
Python rates CVE-2026-124249 medium: an expired Set-Cookie can remove cookies that belong to other domains.
Today 1.5K readers · 2.4K views · 768 reads · all time 189K views