CVE-2026-6019: http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context.
Medium CVSS 6.1
- CVE id
- CVE-2026-6019
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Python Runtimes and servers |
< 3.13.14 >= 3.14.0, <= 3.14.4 |
3.13.14 |
Versions we track that it affects: Python 3.12.16
How to fix it
Upgrade Python to 3.13.14 or later.
python --version
- Install the patched Python release of your minor line (pyenv, the python image tag, or your OS packages) and recreate virtual environments.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
http.cookies.Morsel.js_output() returns an inline <script> snippet and only escapes " for JavaScript string context. It does not neutralize the HTML parser-sensitive sequence </script> inside the generated script element. Mitigation base64-encodes the cookie value to disallow escaping using cookie value.
References
- CVE-2026-6019 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-6019
- Web: https://github.com/python/cpython/commit/3c59b8b53fc75c7f9578d16fb8201ceb43e8f76c
- Web: https://github.com/python/cpython/commit/76b3923d688c0efc580658476c5f525ec8735104
- Web: https://github.com/python/cpython/commit/f795e042043dfe26c42e1971d4502c1cdc4c65b8
- Web: https://github.com/python/cpython/issues/90309
- Web: https://github.com/python/cpython/pull/148848
- Web: https://mail.python.org/archives/list/security-announce@python.org/thread/IVNWGV2BBNC3RHQAFS22UP4DY56SAXX3/
- Web: https://cert-portal.siemens.com/productcert/html/ssa-457936.html
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.