---
id: "CVE-2026-16052"
page: "https://infrastack.ai/live/CVE-2026-16052"
kind: "vulnerability"
aliases: ["CVE-2026-16052"]
title: "Python: cookie attribute values with semicolons can relax cookie restrictions"
severity: "low"
cvss: 2.3
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["python", "runtime", "web-apps"]
not_affected_if: ["fixed-cookie-values", "no-morsel-usage"]
published_at: "2026-11-12T17:17:44+00:00"
first_seen_at: "2026-11-12T17:39:39+00:00"
updated_at: "2026-11-12T17:40:06+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-16052", "first_seen_at": "2026-11-12T17:39:39+00:00"}]
exploit_sources: []
---

# Python: cookie attribute values with semicolons can relax cookie restrictions

Link for people: https://infrastack.ai/live/CVE-2026-16052 (this .md is for agents)

Python's http.cookies.Morsel class writes semicolons inside attribute values verbatim into cookie output. An attacker who controls those values could add or change attributes such as Domain or SameSite, weakening the cookie's restrictions.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `python3 --version` to see whether the runtime is a Python release covered by the advisory
- Search the codebase for `http.cookies` or `Morsel` to find code that sets cookie attributes from user-controlled input

## Timeline

- 2026-11-12T17:39:39+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-16052

## Documents

- [advisory] Python security-announce: [Security-announce][CVE-2026-16052] Cookie Attribute Injection via Unescaped Semicolons in http.cookies.Morsel https://mail.python.org/archives/list/security-announce@python.org/message/IZL4QUFV7PKGT2JYSU2DCBMLTWYJDGKZ/

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
