All Pillow CVEs — Complete Vulnerability History
Pillow is Python's image processing library — almost every Python web app that handles image uploads uses it. Image parsing is notoriously attack-surface-heavy, and Pillow has had many CVEs.
PyPI
50M+ weekly downloads
5 CVEs total
1 CRITICAL
Full CVE history
| CVE | Year | Severity | Description | Fix |
|---|---|---|---|---|
| CVE-2021-25287 | 2021 | CRITICAL | Out-of-bounds read via crafted PDF | Fixed 8.2.0 |
| CVE-2021-27923 | 2021 | HIGH | Buffer overflow via TIFF parsing | Fixed 8.1.1 |
| CVE-2022-22815 | 2022 | HIGH | Memory corruption via crafted image file | Fixed 9.0.0 |
| CVE-2022-22816 | 2022 | HIGH | Buffer overflow in ImagePath.getbbox | Fixed 9.0.0 |
| CVE-2023-44271 | 2023 | HIGH | DoS via uncontrolled resource in ImageFont | Fixed 10.0.1 |
Current safe version: 10.3.0
# Before
"Pillow==8.0.0"
# After
"Pillow==10.3.0"
Then run: pip install -r requirements.txt
Paste your manifest — see your exact versions against the full CVE history.
Scan with PackageFix →Free · No signup · No CLI · Runs in your browser
Common questions
Why does Pillow have so many CVEs?
Image file parsing requires handling dozens of complex binary formats (JPEG, PNG, TIFF, BMP, WebP, etc.), each with their own quirks. C extensions handle the low-level parsing, which means memory safety issues in the underlying C code surface as CVEs.
Should I validate image uploads before passing to Pillow?
Yes — always validate that uploaded files are valid images of the expected format. Use Pillow's verify() method or check the file header before processing. Reject unexpected formats entirely.