CVE-2024-28219: Pillow Buffer Overflow Vulnerability

pillow Updated 07 Jul 2026

Summary

07/07/2026
Yes i
High
6.7

CVE-2024-28219: Pillow buffer overflow vulnerability. Affects pillow versions < 10.3.0. Fixed in 10.3.0. How to fix ↓

Also tracked for

The same CVE-2024-28219 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pillow is a widely used Python Imaging Library that adds image processing capabilities to your Python interpreter. It supports opening, manipulating, and saving many different image file formats. The library is essential for developers who require image handling in their applications. However, a critical vulnerability has been identified in versions prior to 10.3.0, which could lead to severe security risks.

Vulnerability Detail

In the Pillow library, specifically in the _imagingcms.c file, a buffer overflow vulnerability exists due to the improper use of the strcpy function instead of the safer strncpy function. This flaw can potentially allow an attacker to execute arbitrary code, leading to data corruption, crashes, or unauthorized access to sensitive information. The vulnerability is particularly concerning as it affects a core component of the library, making it a significant risk for applications that rely on Pillow for image processing.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

10.3.0

This is the first release that contains the fix.

pip install --upgrade "pillow==10.3.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, if you cannot update the Pillow package immediately, consider implementing input validation to ensure that image data does not exceed expected limits. However, this is not a complete solution and should not replace updating the package.

Conclusion

The buffer overflow vulnerability in the Pillow library poses a significant risk to applications that utilize this image processing tool. It is essential to update to version 10.3.0 or later to mitigate this risk. Regular monitoring for vulnerabilities, such as through Vulert, can help maintain the security of your software.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

A buffer overflow vulnerability occurs when a program writes more data to a buffer than it can hold, potentially allowing attackers to overwrite adjacent memory and execute arbitrary code.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The consequences can include data corruption, application crashes, and unauthorized access to sensitive information, which can lead to significant security breaches.

Yes, the CVSS score for this vulnerability is 6.7, indicating a medium severity level that requires prompt attention.

If an immediate update is not possible, implement input validation as a temporary workaround, but prioritize updating to the patched version as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for pillow.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

10.3.0

This is the first release that contains the fix.

pip install --upgrade "pillow==10.3.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback