Descrizione
The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 5.9.
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
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.
Riferimenti
- Riferimentohttps://github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa
- Riferimentohttps://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970
- Riferimentohttps://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420
- Riferimentohttps://github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74
- Riferimentohttps://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d
- Riferimentohttps://github.com/python/cpython/commit/aa17c688d2c160969f2c8963f4454cdd139808e7
- Riferimentohttps://github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58
- Riferimentohttps://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993
- Riferimentohttps://github.com/python/cpython/issues/157579
- Riferimentohttps://github.com/python/cpython/pull/157580
- Riferimentohttp://www.openwall.com/lists/oss-security/2026/09/29/40