Descrizione
Pillow is a Python imaging library. From 1.0 through 12.3.0, ImageFileDirectory_v2.load() in src/PIL/TiffImagePlugin.py retains a separate bytes object for each out-of-line IFD tag value without limiting the total data read or preventing distinct tags from referencing the same file region. A small crafted TIFF or EXIF-bearing JPEG, PNG, WebP, or MPO can therefore cause memory use quadratic in the input size. TIFF and some JPEG paths trigger parsing during Image.open(), while other formats are exposed when EXIF is requested, including through getexif() or ImageOps.exif_transpose(). The declared pixel dimensions do not bound this metadata allocation, so decompression-bomb checks do not prevent process memory exhaustion. This issue is fixed in version 13.0.0.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.7, EPSS 0.4% (percentile 32).
Versioni da aggiornare
- python-pillow Pillow: vulnerabile la versione
>= 1.0, < 13.0.0→ installare l'ultima release supportata dal vendor.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Applicare rate limiting e limiti sulle risorse a monte del servizio e monitorarne la disponibilità.
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 | Pillow | >= 1.0, < 13.0.0 | — |
Riferimenti
- Riferimentohttps://github.com/python-pillow/Pillow/commit/4908edaf7f416616784c7c03d8c1a60153710ffb
- Riferimentohttps://github.com/python-pillow/Pillow/commit/4b63dffd8a6d980fa0e21b40832fa6cbf033eacf
- Riferimentohttps://github.com/python-pillow/Pillow/releases/tag/13.0.0
- Riferimentohttps://github.com/python-pillow/Pillow/security/advisories/GHSA-wqgw-9xfh-qf2g
- Riferimentohttps://github.com/python-pillow/Pillow/security/advisories/GHSA-wqgw-9xfh-qf2g