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

PackageAffected versionsFixed 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

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.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

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.