# CVE-2026-124249: `http.cookiejar` applies expired `Set-Cookie` to cookie store before policy validation

Status: published. Published: 2026-11-09. Updated: 2026-11-10.

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.

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: PSF) — https://github.com/python/cpython/pull/161570
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: PSF) — https://github.com/python/cpython/commit/4e9d037f1cfc8e29efcb1f67bc668e06ff2b6643
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: PSF) — https://github.com/python/cpython/commit/8eb3d2c1c41ca7ce628554413981c1eb763a1494
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: PSF) — https://github.com/python/cpython/commit/ac1d49f4fbb33941475c5aa3cb663ab39d64cb73

## Affected products and versions

- Python Software Foundation / CPython: ≥ 0; < 3.16.0 (affected, python). Source: CNA: PSF

## Severity and prioritization

- CVSS 4.0: 6.3 (medium); CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N; source: CNA: PSF

- CVSS 4.0: 6.3 (medium); CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X; source: NVD: cna@python.org

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-346

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/python/cpython/pull/161570 (CNA: PSF; patch)

- https://github.com/python/cpython/issues/161569 (CNA: PSF; issue-tracking)

- https://mail.python.org/archives/list/security-announce@python.org/thread/Y6IKNZ2VZUS2L6CLQICSFUEMCLT7OLTY/ (CNA: PSF; vendor-advisory)

- https://github.com/python/cpython/commit/4e9d037f1cfc8e29efcb1f67bc668e06ff2b6643 (CNA: PSF; patch)

- https://github.com/python/cpython/commit/8eb3d2c1c41ca7ce628554413981c1eb763a1494 (CNA: PSF; patch)

- https://github.com/python/cpython/commit/ac1d49f4fbb33941475c5aa3cb663ab39d64cb73 (CNA: PSF; patch)

- http://www.openwall.com/lists/oss-security/2026/11/09/24 (ADP: CVE)

- https://github.com/python/cpython/issues/161569 (cna@python.org)

- https://github.com/python/cpython/pull/161570 (cna@python.org)

- https://mail.python.org/archives/list/security-announce@python.org/thread/Y6IKNZ2VZUS2L6CLQICSFUEMCLT7OLTY/ (cna@python.org)

- http://www.openwall.com/lists/oss-security/2026/11/09/24 (af854a3a-2127-422b-91ae-364da2661108)

## Provenance

- CNA: PSF: https://www.cve.org/CVERecord?id=CVE-2026-124249; retrieved 2026-11-10; source updated 2026-11-10

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-124249; retrieved 2026-11-10; source updated 2026-11-09

Revision: 1e67368ce4a813e07859b17497f797c72611aa93875fa540b6760d07460ee04f

Canonical: https://y2.dev/cve/CVE-2026-124249

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.