Description
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.
Published: 2026-11-09
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: Session cookie deletion
Action: Patch
AI Analysis

Impact

The vulnerability lies in http.cookiejar's handling of expired Set-Cookie headers; when such a header arrives, the library deletes a cookie whose domain and path match the header using only the cookie policy, without first verifying whether the cookie actually exists or is valid. This allows a malicious server to send an expired Set-Cookie for a domain different from its own, causing the cookie store to remove a cookie that belongs to another domain. The consequence is the loss of valid authentication cookies or other sensitive data that the application relies on, potentially denying users access to legitimate services. The weakness is identified as CWE-346 because the software fails to enforce proper access control on cookie deletion.

Affected Systems

The issue affects CPython, the reference implementation of Python, particularly any use of urllib's HTTPCookieProcessor that shares a cookie jar across domains. No specific CPython version is listed in the advisory, so all installations using the affected cookiejar code should be examined for the presence of the patch commit.

Risk and Exploitability

The CVSS score of 6.3 classifies the flaw as moderately severe. While the EPSS score is not published, the vulnerability’s impact is localized to processes that maintain a shared cookie jar, and an attacker would need to provoke the client into processing a crafted HTTP response containing an expired Set-Cookie for a different domain. The KEV catalog notes this is not currently part of any known exploit set. The attack vector is therefore likely an HTTP request/response attack against an application that relies on urllib for network communication.

Generated by OpenCVE AI on November 9, 2026 at 15:51 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to the latest CPython release that incorporates the cookie policy check in http.cookiejar.
  • If upgrading is not feasible, apply the patch from the CPython pull request that adds the policy validation before cookie deletion to your local http.cookiejar module.
  • After applying the fix, test the application with a server that sends expired Set-Cookie headers for domains other than its own to ensure that no unrelated cookies are removed.

Generated by OpenCVE AI on November 9, 2026 at 15:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 09 Nov 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Python
Python cpython
Python Software Foundation
Python Software Foundation cpython
Vendors & Products Python
Python cpython
Python Software Foundation
Python Software Foundation cpython

Mon, 09 Nov 2026 14:30:00 +0000

Type Values Removed Values Added
Description 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.
Title `http.cookiejar` applies expired `Set-Cookie` to cookie store before policy validation
Weaknesses CWE-346
References
Metrics cvssV4_0

{'score': 6.3, 'vector': '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'}


Subscriptions

Python Cpython
Python Software Foundation Cpython
cve-icon MITRE

Status: PUBLISHED

Assigner: PSF

Published:

Updated: 2026-11-09T14:20:47.891Z

Reserved: 2026-11-07T00:18:32.381Z

Link: CVE-2026-124249

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-11-09T15:17:14.963

Modified: 2026-11-09T15:17:15.090

Link: CVE-2026-124249

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-09T16:35:18Z

Weaknesses