Skip to main content

CPython CVE-2026-16052

| EUVDEUVD-2026-124537 LOW
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-11-12 PSF GHSA-x8gr-g883-r98g
2.3
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply untrusted cookie attribute value
  2. Delivery
    App sets it via Morsel attribute
  3. Exploit
    Semicolon emitted verbatim in Set-Cookie
  4. Execution
    Browser parses injected Domain/SameSite
  5. Impact
    Cookie scope restrictions relaxed

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

Exploitation requires a host application to pass attacker-controlled input into a non-comment http.cookies.Morsel attribute value (e.g. Domain, SameSite, Path), causing a verbatim ';' separator to be emitted in the Set-Cookie output. It does NOT affect default or typical usage where cookie attribute values are developer-controlled constants, nor the 'comment' attribute (which is escaped). Limiting factors, consistent with the CVSS 4.0 vector: an attack requirement is present (AT:P), passive user interaction is needed (UI:P) since a victim's browser must parse the malformed cookie, and impact is confined to low integrity (VI:L) - relaxing cookie Domain/SameSite scoping - with no confidentiality or availability impact.

Impact

This is a genuinely low-priority issue, and the signals agree. The vuln.today decision label is 'monitor', there is no CISA KEV listing, no EPSS score was supplied, and no public exploit code or PoC reference appears in the input (the three references are the upstream fix PR, the tracking issue, and the PSF security-announce thread - remediation material, not exploit material). The only CVSS vector provided is CVSS 4.0 (base 2.3): AV:N/AC:L/AT:P/PR:N/UI:P with impact limited to VI:L (low integrity on the vulnerable system) and VC/VA/SC/SI/SA all N. The AT:P (attack requirement present) and UI:P (passive user interaction) metrics plus the description ('An attacker who can control these values') mean this is not a standalone remote flaw: it only matters when an application feeds attacker-controlled data into non-comment cookie attribute values via http.cookies.Morsel. That application-dependent precondition, combined with the N confidentiality/availability impact and low integrity impact, makes this a low-real-risk, defense-in-depth hardening fix rather than an emergency. No CVSS 3.1 vector and no EPSS were provided, so cross-signal comparison relies on the 4.0 vector and the 'monitor' label only.

Exploit ScenarioDerived

An application uses http.cookies.Morsel and sets a cookie attribute (such as Domain or SameSite) from untrusted, attacker-influenced input. Because the pre-fix Morsel emits a separator semicolon verbatim in attribute values, the attacker embeds 'value; SameSite=none' (or similar), and the victim's browser parses the injected text as additional cookie attributes, relaxing Domain or SameSite restrictions. No public exploit or PoC reference is present in the input; exploitation depends entirely on the hosting application passing untrusted data into cookie attributes.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 12, 2026

Attribute injection in CPython's http.cookies.Morsel class lets a ';' embedded in an attribute value such as Domain, SameSite or Path be emitted verbatim into the generated Set-Cookie header, so a browser parsing the result can read the trailing text as additional cookie attributes and have the cookie's Domain or SameSite scoping relaxed. Only applications that pass attacker-influenced strings into non-comment Morsel attribute values are exposed; normal use with developer-supplied constants is unaffected, and the comment attribute is already escaped on output. CVSS 4.0 scores this 2.3 (AT:P, UI:P, VI:L) and the independent assessment rates it a low-priority integrity issue with a vuln.today decision of monitor; no public exploit code was identified at time of analysis, and the fix exists only as an upstream pull request rather than a released patched version.

RemediationAI

No vendor-released patched version was identified at time of analysis; the fix exists as upstream pull request https://github.com/python/cpython/pull/161711 (referenced from issue https://github.com/python/cpython/issues/161707), whose documentation entries are marked for the next release, so the exact shipped version is not independently confirmed and operators should track the PSF security-announce thread https://mail.python.org/archives/list/security-announce@python.org/thread/IZL4QUFV7PKGT2JYSU2DCBMLTWYJDGKZ/ for the release that carries it. Until then, the actionable control is at the application layer, since exploitation requires the host program to place attacker-controlled text into a Morsel attribute: treat attribute values such as domain, samesite and path as developer-chosen constants, and where they must be derived from request data, validate them against an allowlist or reject any value containing the ';' separator before assigning it through morsel[...] =, set(), setdefault(), update() or |=. The trade-off is that strict allowlisting can reject legitimate values (for example multi-label Domain strings) and requires handling a validation error at each assignment site, while the comment attribute needs no such restriction because its semicolons are already escaped to \073 on output. Applications that adopt the upstream behaviour early by replicating the CookieError check should expect it to raise on previously accepted input, so error paths must be reviewed before enabling it.

Affected VersionsENISA

CPython 0 <3.16.0

Affected Packages

euvd cpython fix: 3.16.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The http.cookies module of the CPython standard library implements Morsel, a dict-like object holding the reserved Set-Cookie attributes (expires, path, comment, domain, max-age, secure, version, httponly, samesite). Assignments through __setitem__, set(), setdefault(), update() and |= previously validated attribute names against the internal _reserved mapping and rejected control characters via _has_control_character, but the reserved separator ';' was accepted in any value and written out unchanged by OutputString. Because ';' delimits attributes in a Set-Cookie header, a value such as 'foo; SameSite=none' assigned to the domain or samesite attribute produces a header whose trailing segment is re-parsed by the user agent as a separate attribute, which is the CWE-74 improper-neutralization-of-special-elements pattern (output/attribute injection). The only attribute that handled the separator safely was comment, which is quoted like a cookie value and has ';' escaped to \073. The trigger described in the sources is a host application placing attacker-controlled text into a non-comment attribute value; the flaw has no effect when attribute values are constants chosen by the developer, and the upstream patch therefore adds a _check_attribute helper that raises CookieError for ';' in every attribute except comment while preserving the existing escaping for comment.

Know when Cpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PSF) PRIMARY 2.3 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 3.1 LOW

AC:H and UI:R because exploitation needs an application that routes untrusted data into Morsel cookie attributes plus a victim browser parsing it; impact is limited to low integrity (cookie scope relaxation), so C:N/A:N.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 12, 2026 - 17:02 EUVD
CVE Published
Nov 12, 2026 - 16:28 cve.org
LOW 2.3

DescriptionCVE.org

The http.cookies.Morsel class allows separator semicolons in attribute values and includes them verbatim in all output formats. An attacker who can control these values could use this to relax the cookie's Domain or SameSite restrictions.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
Ubiquitous
http.cookies is part of the CPython standard library, present everywhere Python runs
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-17084 MEDIUM POC
6.0 Aug 18

Integrity bypass in CPython's stringprep module causes divergent domain name normalization when processing international

CVE-2026-115557 CRITICAL
9.4 Oct 24

CPython's ssl module validates TLS certificate chains that anchor to known-compromised eMudhra CA certificates, so anyon

CVE-2026-19445 CRITICAL
9.2 Sep 30

A use-after-free in CPython's ssl module lets a remote, unauthenticated TLS client crash a Python TLS server process - o

CVE-2026-6100 CRITICAL
9.1 Apr 13

CPython decompression modules (lzma, bz2, gzip) allow memory corruption via use-after-free when decompressor instances a

CVE-2026-3298 HIGH
8.8 Apr 21

Out-of-bounds buffer write in CPython's asyncio.ProactorEventLoop (Windows only) allows remote attackers to trigger memo

CVE-2026-11972 HIGH
8.2 Jun 23

Denial of service in CPython's tarfile module allows remote attackers to trigger an infinite loop by supplying a crafted

CVE-2026-9669 HIGH
8.2 Jun 08

Stack-based buffer overflow in CPython's bz2.BZ2Decompressor allows remote attackers to crash Python applications by sen

CVE-2026-119170 HIGH
8.2 Nov 06

FIPS algorithm enforcement in CPython 3.14.10's hashlib module can fail for hash requests made with usedforsecurity=True

CVE-2026-11940 HIGH
7.8 Jun 23

Path traversal in CPython's tarfile module allows a crafted tar archive to bypass the 'data' and 'tar' extraction filter

CVE-2026-19553 HIGH
7.6 Sep 30

Certificate hostname verification is silently skipped in CPython's TLS stack when an application enables SSLContext.chec

CVE-2026-4786 HIGH
7.0 Apr 13

Command injection in CPython's webbrowser.open() API bypasses previous CVE-2026-4519 mitigation via specially crafted UR

CVE-2026-4519 HIGH
7.0 Mar 20

The webbrowser.open() API in CPython accepts URLs with leading dashes, which certain web browsers interpret as command-l

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy