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.
Fix
Patch, vendor advisory and mitigation references on NVD 5
- https://github.com/python/cpython/commit/3c59b8b53fc75c7f9578d16fb8201ceb43e8f76c Patch
- https://github.com/python/cpython/commit/76b3923d688c0efc580658476c5f525ec8735104 Patch
- https://github.com/python/cpython/commit/f795e042043dfe26c42e1971d4502c1cdc4c65b8 Patch
- https://github.com/python/cpython/pull/148848 Issue Tracking, Patch
- https://mail.python.org/archives/list/[email protected]/thread/IVNWGV2BBNC3RHQAFS22UP4DY56SAXX3/ Mailing List, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 2.1 · pythonNVD modified 2026-10-26 21:10
Affected (CPE criteria) 9
cpe:2.3:a:python:python:*:*:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha1:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha2:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha3:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha4:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha5:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha6:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha7:*:*:*:*:*:*cpe:2.3:a:python:python:3.15.0:alpha8:*:*:*:*:*:*
References 6
- https://github.com/python/cpython/commit/3c59b8b53fc75c7f9578d16fb8201ceb43e8f76c Patch
- https://github.com/python/cpython/commit/76b3923d688c0efc580658476c5f525ec8735104 Patch
- https://github.com/python/cpython/commit/f795e042043dfe26c42e1971d4502c1cdc4c65b8 Patch
- https://github.com/python/cpython/issues/90309 Exploit, Issue Tracking
- https://github.com/python/cpython/pull/148848 Issue Tracking, Patch
- https://mail.python.org/archives/list/[email protected]/thread/IVNWGV2BBNC3RHQAFS22UP4DY56SAXX3/ Mailing List, Vendor Advisory