Vulnerability DatabaseCVE-2026-124249

CVE-2026-124249: 
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2026-124249 is a cookie jar origin validation vulnerability in CPython's http.cookiejar module that allows a network-accessible server to delete cookies belonging to other domains from a shared cookie jar. The flaw was discovered and reported by Kirill Podoprigora (Eclips4), with the fix merged on November 7, 2026, and publicly disclosed on November 9, 2026. It affects CPython versions prior to 3.16.0a2 (with backports required for 3.11 through 3.15). The vulnerability carries a CVSS v4.0 base score of 6.3 (Medium), classified under CWE-346 (Origin Validation Error) (Github Advisory, oss-security).

Technical details

The root cause is that http.cookiejar.CookieJar processed expired Set-Cookie headers by deleting the matching stored cookie using the Domain and Path attributes taken directly from the response header, without first consulting CookiePolicy.set_ok() as required by RFC 6265 section 5.3. This means a malicious or compromised server can craft an HTTP response with an already-expired Set-Cookie header specifying an arbitrary domain and path, causing the shared cookie jar (such as the one used by urllib.request.HTTPCookieProcessor) to delete cookies that legitimately belong to a different domain. The attack requires the attacker to be in a position to serve HTTP responses to the victim application (e.g., via a man-in-the-middle position or a compromised server), making exploitation conditional on specific deployment scenarios (CPython Issue, CPython PR).

Impact

Successful exploitation allows an unauthenticated network attacker to selectively delete authentication tokens, session cookies, or other credentials stored in a shared CookieJar for domains the attacker does not control. This primarily affects integrity (unauthorized deletion of cookie data) with no direct confidentiality or availability impact. Applications using urllib's HTTPCookieProcessor with a shared cookie jar across multiple domains are most at risk, as forced cookie deletion could cause session invalidation, forced re-authentication, or disruption of application workflows (Github Advisory, oss-security).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date. The NVD SSVC assessment confirms exploitation is "none" and the vulnerability is not automatable. The EPSS score is approximately 0.272%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires the attacker to be able to serve HTTP responses to the target application (e.g., via a man-in-the-middle position), limiting the practical attack surface (Github Advisory, oss-security).

Exploitation steps

  1. Identify target: Locate a Python application using urllib.request.HTTPCookieProcessor with a shared http.cookiejar.CookieJar that communicates with multiple domains and runs a vulnerable CPython version (< 3.16.0a2 or unpatched 3.11–3.15).
  2. Gain response interception capability: Position yourself to serve HTTP responses to the target application — for example, via DNS spoofing, ARP poisoning, BGP hijacking, or by controlling a server the application communicates with.
  3. Craft malicious response: Construct an HTTP response containing an expired Set-Cookie header targeting a cookie belonging to a different domain stored in the shared jar. For example:
    HTTP/1.1 200 OK
    Set-Cookie: session=deleted; Domain=victim.example.com; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT
  4. Deliver response: Serve this response to the target Python application when it makes a request to any host the attacker controls or can intercept.
  5. Cookie deletion triggered: The vulnerable CookieJar processes the expired Set-Cookie header and deletes the matching cookie for victim.example.com without consulting the cookie policy, effectively invalidating the victim domain's session or authentication token (CPython PR, CPython Issue).

Indicators of compromise

  • Network: Unexpected HTTP responses from servers containing Set-Cookie headers with Expires values in the past (epoch or historical dates) and Domain attributes pointing to domains unrelated to the responding server.
  • Logs: Application logs showing unexpected session invalidation or re-authentication events for services the application had previously authenticated to; HTTP response logs containing expired Set-Cookie headers with cross-domain Domain attributes.
  • Application Behavior: Python applications using urllib unexpectedly losing authentication state for specific domains mid-session, particularly after communicating with a different host.

Mitigation and workarounds

The fix has been merged into CPython main (commit 8eb3d2c) and backported to branches 3.11, 3.12, 3.13, 3.14, and 3.15 via separate PRs. Users should upgrade to CPython 3.16.0a2 or later, or apply the security backport for their respective branch (3.11–3.15). As a workaround, applications can implement a custom CookiePolicy subclass that overrides set_ok() to enforce strict domain validation before cookie deletion, or avoid sharing a single CookieJar across requests to multiple untrusted domains (CPython PR, oss-security).

Community reactions

The Python Security team (PSF) disclosed the vulnerability via the security-announce@python.org mailing list, with Kirill Podoprigora authoring the announcement and Victor Stinner reviewing and approving the fix. The issue was forwarded to the oss-security mailing list by Alan Coopersmith of Oracle on November 9, 2026. Community reaction has been low-key given the moderate severity and limited exploitation potential (oss-security, CPython PR).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

python3.11

Affected

sid

python3.15

Affected

trixie

python3.13

Affected

Ubuntu

Unknown

bionic (esm-apps)

python3.7

Unknown

bionic (esm-infra)

python2.7

Unknown

devel

python3.14

Unknown

focal (esm-apps)

python2.7

Unknown

focal (esm-infra)

python3.8

Unknown

jammy

python2.7

Unknown

jammy (esm-apps)

python2.7

Unknown

noble

python3.12

Unknown

RHEL / CentOS

Affected

RHEL 8

python3.12.src

Affected

RHEL 9

python3.9.src

Affected

RHEL 10

python3.12.src

Affected

Source: This report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-115559MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.16-debuginfo
NoYesNov 10, 2026
CVE-2026-124249MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • python3.12-idle
NoYesNov 09, 2026
CVE-2026-115791MEDIUM5.3
  • Python Interpreter logoPython Interpreter
  • python3
NoYesNov 10, 2026
CVE-2026-16052LOW2.3
  • Python Interpreter logoPython Interpreter
  • python3.14-freethreading-libs
NoYesNov 12, 2026
CVE-2026-19552NONEN/A
  • Python Interpreter logoPython Interpreter
  • python-tools
NoYesNov 09, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management