Descrizione
virtualenv is a tool for creating isolated virtual python environments. Prior to 21.14.9, the builtin creator calls ensure_dir() for executable, library, and package directories, and ensure_dir() accepts an existing symlink to a directory because exists() follows it. Interpreter creation, seed installation, and activation generation then write through the linked parent outside the requested destination when another local account prepared the tree and the invoking user can access the target. The --clear option removes the planted tree first, while ordinary creation reaches it; arbitrary attacker-selected output bytes are not established. This issue is fixed in version 21.14.9.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 4.5.
Versioni da aggiornare
- Virtualenv Virtualenv: vulnerabili le versioni dalla
20.0.0precedenti alla21.14.9→ aggiornare alla21.14.9o successiva.
Patch e advisory
- Patch: github.com/pypa/virtualenv/commit/554d9f9d4f775…
- Patch: github.com/pypa/virtualenv/pull/3429
- Note di rilascio: github.com/pypa/virtualenv/releases/tag/21.14.9
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 |
|---|---|---|---|
| Virtualenv | Virtualenv | ≥ 20.0.0 < 21.14.9 | 21.14.9 |
Riferimenti
- Patchhttps://github.com/pypa/virtualenv/commit/554d9f9d4f7758f5cf53f993031e29787f1f74c5
- Patchhttps://github.com/pypa/virtualenv/pull/3429
- Exploit pubblicohttps://github.com/pypa/virtualenv/security/advisories/GHSA-cw65-gx24-rc82
- Note di rilasciohttps://github.com/pypa/virtualenv/releases/tag/21.14.9