CVE-2026-16052

Cookie Attribute Injection via Unescaped Semicolons in http.cookies.Morsel

Published Nov 12, 2026 CVSS 4.0 · 2.3 Low EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The http.cookies.Morsel class accepts semicolons in cookie attribute values and includes them verbatim in all output formats. This flaw allows an attacker who can control those values to inject additional attributes that can relax the cookie's Domain or SameSite restrictions, effectively enabling cross‑domain tracking or a potential CSRF attack. The weakness is a classic example of CWE‑74, a web‑application attack that results in improper input handling.

Affected Systems

Python Software Foundation CPython is affected. Any installation of CPython that includes the http.cookies.Morsel class is vulnerable. No specific CPython version is listed, but the issue exists in the current release until patched.

Risk and Exploitability

The CVSS score is 2.3, indicating a low severity vulnerability. The EPSS score is less than 1%, suggesting a very low likelihood of exploitation. It is not listed in CISA's KEV catalog. The vulnerability is exploitable only if an attacker can influence cookie attribute values, for example through crafted HTTP responses or client-side code. The attack would likely proceed remotely through web traffic without needing privileged access.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update CPython to a version that includes the fix in commit/pull request 161711.
  • If update cannot be performed immediately, sanitize cookie attribute values by stripping or rejecting semicolons before use.
  • Verify that any third‑party libraries or frameworks that generate cookies are using the patched CPython or have similar input validation in place.

Generated by OpenCVE AI on November 13, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

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
Type Values Removed Values Added
Description 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.
Title Cookie Attribute Injection via Unescaped Semicolons in http.cookies.Morsel
Weaknesses CWE-74
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 17, 2026, 4:25 PM
Reserved
Jul 17, 2026, 10:34 AM
Status
Awaiting Analysis
Published
Nov 12, 2026, 5:17 PM
Modified
Nov 17, 2026, 5:18 PM