Python · Python · CVE-2026-6019
**Name of the Vulnerable Software and Affected Versions**
Python (affected versions not specified)
**Description**
The `js output()` function in `http.cookies.Morsel` returns an inline <script> snippet that only escapes double quotes for JavaScript string context. It fails to neutralize the HTML parser-sensitive sequence </script> within the generated script element, which could allow for script injection.
**Recommendations**
As a temporary workaround, consider restricting the use of the `js output()` function until a patch is available.
Base64-encode the cookie value to prevent escaping via the cookie value.