Descrizione
Pillow is a Python imaging library. In versions through 12.3.0, the libtiff TIFF encoder can pass arguments to TIFFSetField() that do not match libtiff’s definition of the corresponding tag. When an application saves attacker-controlled image metadata through this encoder, crafted tag values can cause invalid memory reads, copying process memory into the encoded output or crashing the process. Applications that return the encoded output to an attacker can disclose that memory. The issue is reachable when re-saving compressed TIFF images and through certain conversions that preserve EXIF metadata into compressed TIFF output. This vulnerability is fixed in version 13.0.0.
Come correggere
Priorità: Alta — pianificare la correzione entro pochi giorni. Motivazione: CVSS 9.1, EPSS 0.5% (percentile 43).
Versioni da aggiornare
- Python Pillow: vulnerabili le versioni precedenti alla
13.0.0→ aggiornare alla13.0.0o successiva. - python-pillow Pillow: vulnerabile la versione
< 13.0.0→ installare l'ultima release supportata dal vendor.
Patch e advisory
- Patch: github.com/python-pillow/Pillow/commit/570df030…
- Patch: github.com/python-pillow/Pillow/pull/10227
- Advisory del vendor: github.com/python-pillow/Pillow/security/adviso…
- Note di rilascio: github.com/python-pillow/Pillow/releases/tag/13…
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 | Pillow | < 13.0.0 | 13.0.0 |
| python-pillow | Pillow | < 13.0.0 | — |
Riferimenti
- Patchhttps://github.com/python-pillow/Pillow/commit/570df030c0d30c2bf5336b2ab59f3902d8ab0b6d
- Patchhttps://github.com/python-pillow/Pillow/pull/10227
- Advisory del vendorhttps://github.com/python-pillow/Pillow/security/advisories/GHSA-xvh5-g6gv-559v
- Note di rilasciohttps://github.com/python-pillow/Pillow/releases/tag/13.0.0