# CVE-2026-124249: Python http.cookiejar cookie deletion policy bypass

Source: https://junglewise.ai/threats/cve-2026-124249-http-cookiejar-cookiejar-deleted-a-stored-cookie-when-a-response  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-09. Updated: 2026-11-09  
License: CC BY 4.0 with a link back

CVE-2026-124249 · Severity: info · Published 2026-11-09

Python's http.cookiejar module, used by urllib to manage HTTP cookies in web requests, allows a server to delete cookies belonging to other domains from a shared cookie jar by sending an expired Set-Cookie header. An attacker controlling a web server could exploit this to delete session cookies or authentication cookies from other sites that a user has visited, potentially forcing re-authentication or disrupting user sessions across multiple services.

Technologies: [Python CPython](https://junglewise.ai/threats/technologies/python-cpython). Vendors: [Python](https://junglewise.ai/threats/vendors/python).

## Quick answers

**Is CVE-2026-124249 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-124249 being exploited in the wild.

**How severe is CVE-2026-124249?** Informational severity, published 9 November 2026.

**Which products and versions are affected?** Python CPython 3.11, 3.12, 3.13, 3.14, 3.15, 3.16.

**Is there a fix for CVE-2026-124249?** Yes: fixed in CPython 3.11, 3.12, 3.13, 3.14, 3.15, 3.16 (via backports gh-161581, gh-161582, gh-161583, gh-161580, gh-161579, and main branch respectively). Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-124249 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-124249?** Check whether you run Python CPython at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in CPython 3.11, 3.12, 3.13, 3.14, 3.15, 3.16 (via backports gh-161581, gh-161582, gh-161583, gh-161580, gh-161579, and main branch respectively)

## Technical details

The http.cookiejar.CookieJar class failed to consult the CookiePolicy before allowing an expired Set-Cookie header to delete an existing stored cookie, instead using the Domain and Path attributes directly from the server response. This allowed a malicious server to craft a response that deletes cookies belonging to any other domain in a shared jar, violating RFC 6265 section 5.3. The fix adds a policy check (CookiePolicy.set_ok()) before permitting an expired cookie to delete an existing one.

## Affected products

- Python CPython 3.11, 3.12, 3.13, 3.14, 3.15, 3.16

## Timeline

- 2026-11-07: disclosed: Issue reported
- 2026-11-07: patched: Patch merged to main branch

## References

- [https://github.com/python/cpython/issues/161569](https://github.com/python/cpython/issues/161569)
- [https://github.com/python/cpython/pull/161570](https://github.com/python/cpython/pull/161570)

## Related threats

- [Python http.cookies Morsel cookie attribute injection via unescaped semicolons](https://junglewise.ai/threats/cve-2026-16052-the-http-cookies-morsel-class-allows-separator-semicolons-in)
- [CPython ssl.get_server_certificate hostname verification bypass](https://junglewise.ai/threats/cve-2026-19552-when-ca-certs-parameter-was-supplied-to-ssl-get-server)
- [Python hashlib FIPS algorithm enforcement regression](https://junglewise.ai/threats/cve-2026-119170-there-was-a-regression-in-how-fips-algorithms-were-enforced-for)
- [Python socket.getaddrinfo() null byte truncation](https://junglewise.ai/threats/cve-2026-116566-socket-getaddrinfo-previously-accepted-null-bytes-within-host)
- [Python http.client HTTP response parsing bypass](https://junglewise.ai/threats/cve-2026-103995-response-body-and-chunk-parsing-would-handle-non-hex-or-negative)
