Descrizione
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.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 6.1.
Versioni da aggiornare
- Python Python: vulnerabili le versioni precedenti alla
3.13.14→ aggiornare alla3.13.14o successiva. - Python Python: vulnerabili le versioni dalla
3.14.0fino alla3.14.4inclusa → aggiornare a una release successiva alla3.14.4. - Python Python: vulnerabile la versione
3.15.0 alpha1→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha2→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha3→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha4→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha5→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha6→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha7→ installare l'ultima release supportata dal vendor. - Python Python: vulnerabile la versione
3.15.0 alpha8→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: github.com/python/cpython/commit/3c59b8b53fc75c…
- Patch: github.com/python/cpython/commit/76b3923d688c0e…
- Patch: github.com/python/cpython/commit/f795e042043dfe…
- Patch: github.com/python/cpython/pull/148848
- Advisory del vendor: mail.python.org/archives/list/security-announce@pyth…
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Python | Python | < 3.13.14 | 3.13.14 |
| Python | Python | ≥ 3.14.0 ≤ 3.14.4 | — |
| Python | Python | 3.15.0 alpha1 | — |
| Python | Python | 3.15.0 alpha2 | — |
| Python | Python | 3.15.0 alpha3 | — |
| Python | Python | 3.15.0 alpha4 | — |
| Python | Python | 3.15.0 alpha5 | — |
| Python | Python | 3.15.0 alpha6 | — |
| Python | Python | 3.15.0 alpha7 | — |
| Python | Python | 3.15.0 alpha8 | — |
Riferimenti
- Patchhttps://github.com/python/cpython/commit/3c59b8b53fc75c7f9578d16fb8201ceb43e8f76c
- Patchhttps://github.com/python/cpython/commit/76b3923d688c0efc580658476c5f525ec8735104
- Patchhttps://github.com/python/cpython/commit/f795e042043dfe26c42e1971d4502c1cdc4c65b8
- Patchhttps://github.com/python/cpython/pull/148848
- Advisory del vendorhttps://mail.python.org/archives/list/security-announce@python.org/thread/IVNWGV2BBNC3RHQAFS22UP4DY56SAXX3/
- Exploit pubblicohttps://github.com/python/cpython/issues/90309
- Riferimentohttps://cert-portal.siemens.com/productcert/html/ssa-457936.html