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

CVEYearSeverityDescriptionFix
CVE-2021-252872021CRITICALOut-of-bounds read via crafted PDFFixed 8.2.0
CVE-2021-279232021HIGHBuffer overflow via TIFF parsingFixed 8.1.1
CVE-2022-228152022HIGHMemory corruption via crafted image fileFixed 9.0.0
CVE-2022-228162022HIGHBuffer overflow in ImagePath.getbboxFixed 9.0.0
CVE-2023-442712023HIGHDoS via uncontrolled resource in ImageFontFixed 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.

Related