ADVISORIES

CVE Program

CNA-CVE-2026-6019

BaseCookie.js_output() does not neutralize embedded characters

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.

Affected packages

EcosystemPackageAffected versions
Pythonpython
All versions before 3.13.14 (fixed in 3.13.14)
From 3.14.0a1 before 3.14.5rc1 (fixed in 3.14.5rc1)
From 3.15.0a1 before 3.15.0b1 (fixed in 3.15.0b1)

References