Описание
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.
Пакеты
| Пакет | Статус | Версия исправления | Релиз | Тип |
|---|---|---|---|---|
| python3.14 | fixed | 3.14.5~rc1-1 | package | |
| python3.13 | fixed | 3.13.14-1 | package | |
| python3.13 | fixed | 3.13.5-2+deb13u2 | trixie | package |
| python3.11 | removed | package | ||
| python3.11 | no-dsa | bookworm | package | |
| python3.9 | removed | package | ||
| python3.9 | postponed | bullseye | package | |
| pypy3 | unfixed | package | ||
| pypy3 | no-dsa | trixie | package | |
| pypy3 | no-dsa | bookworm | package | |
| pypy3 | postponed | bullseye | package |
Примечания
https://mail.python.org/archives/list/security-announce@python.org/thread/IVNWGV2BBNC3RHQAFS22UP4DY56SAXX3/
https://github.com/python/cpython/issues/90309
https://github.com/python/cpython/pull/148848
Fixed by: https://github.com/python/cpython/commit/76b3923d688c0efc580658476c5f525ec8735104 (main branch)
Fixed by: https://github.com/python/cpython/commit/f795e042043dfe26c42e1971d4502c1cdc4c65b8 (v3.14.5rc1)
Fixed by: https://github.com/python/cpython/commit/3c59b8b53fc75c7f9578d16fb8201ceb43e8f76c (v3.13.14)
Follow-up: https://github.com/python/cpython/issues/149144
Follow-up fix: https://github.com/python/cpython/commit/461b1d96313de02992d284c1782be9aff24586c9 (main branch)
Follow-up fix: https://github.com/python/cpython/commit/4f17f6e04534d93fbd23862f9f290d3a281ab30b (v3.14.6)
Follow-up fix: https://github.com/python/cpython/commit/e7d4c3ff421916986223690a8425d2383f6f3802 (v3.13.14)
EPSS
Связанные уязвимости
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.
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.
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.
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.
EPSS