low2.3
CVE-2026-16052
The http.cookies.Morsel class allows separator semicolons in attribute values and includes them verbatim in all output formats.
Impact
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.
An attacker can exploit this over the network, without logging in, but a user has to be involved, for example by viewing content. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of data or systems being changed.
Affected products · Python Software Foundation
| Product | Affected versions |
|---|---|
| CPython | before 3.16.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/python/cpython/pull/161711
- https://github.com/python/cpython/issues/161707
- https://mail.python.org/archives/list/security-announce@python.org/thread/IZL4QUFV7PKGT2JYSU2DCBMLTWYJDGKZ/
- https://github.com/advisories/GHSA-x8gr-g883-r98g
- https://nvd.nist.gov/vuln/detail/CVE-2026-16052
- https://mail.python.org/archives/list/security-announce@python.org/thread/IZL4QUFV7PKGT2JYSU2DCBMLTWYJDGKZ