CVE-2024-28219 Pillow buffer overflow vulnerability

Medium 6.7 Published Updated

A buffer overflow in Pillow's imaging CMS module allows attackers to execute arbitrary code or cause denial of service via crafted images.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-28219?

CVE-2024-28219 is a medium-severity memory corruption vulnerability in Debian Debian Linux, published on 3 Apr 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of strncpy.

Weakness: CWE-680

Which versions are affected by CVE-2024-28219?

4 open source packages ship an affected version, including pillow. It affects 2 products.

PackageAffectedFixed in
pillow BitnamiAll versionsNone
pillow PyPIAll versions10.3.0
pillow PyPIAll versions10.3.0
pillow PyPIAll versions10.3.0
Linux distribution packages (34)
python3-pillow AlmaLinux:8All versions5.1.1-21.el8_10
python3-pillow-devel AlmaLinux:8All versions5.1.1-21.el8_10
python3-pillow-doc AlmaLinux:8All versions5.1.1-21.el8_10
python3-pillow-tk AlmaLinux:8All versions5.1.1-21.el8_10
python-pillow Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python-pillow-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python-pillow-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python3-pillow Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python3-pillow-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python3-pillow-tk-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-21.el8_10
python-pillow-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python-pillow-debugsource Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow-devel Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow-doc Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow-tk Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python3-pillow-tk-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:5.1.1-21.el8_10
python-pillow Rocky Linux:8All versions0:5.1.1-21.el8_10
python-Pillow SUSE:HPE Helion OpenStack 8All versions4.2.1-3.29.2
venv-openstack-horizon-hpe SUSE:HPE Helion OpenStack 8All versions12.0.5~dev6-14.58.2
python-Pillow SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSAll versions9.5.0-150400.5.15.1
python-Pillow SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSSAll versions9.5.0-150400.5.15.1
python-Pillow SUSE:Linux Enterprise Module for Python 3 15 SP5All versions9.5.0-150400.5.15.1
python-Pillow SUSE:Linux Enterprise Server 15 SP4-LTSSAll versions9.5.0-150400.5.15.1
python-Pillow SUSE:Linux Enterprise Server for SAP Applications 15 SP4All versions9.5.0-150400.5.15.1
python-Pillow SUSE:OpenStack Cloud 8All versions4.2.1-3.29.2
venv-openstack-horizon SUSE:OpenStack Cloud 8All versions12.0.5~dev6-14.58.2
python-Pillow SUSE:OpenStack Cloud 9All versions5.2.0-3.26.2
venv-openstack-horizon SUSE:OpenStack Cloud 9All versions14.1.1~dev11-4.55.2
python-Pillow SUSE:OpenStack Cloud Crowbar 8All versions4.2.1-3.29.2
python-Pillow SUSE:OpenStack Cloud Crowbar 9All versions5.2.0-3.26.2
python-Pillow openSUSE:Leap 15.5All versions7.2.0-150300.3.9.1
python-Pillow openSUSE:Leap 15.5All versions9.5.0-150400.5.15.1

Products include Debian Debian Linux, Python Pillow.

How do I fix CVE-2024-28219?

Upgrade pillow to 10.3.0 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-28219 being exploited?

There is no known exploitation of CVE-2024-28219 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALSA-2024:4227, BIT-pillow-2024-28219, CLSA-2026-1772410267, CLSA-2026-1772583177, DEBIAN-CVE-2024-28219, DLA-3786-1 and 14 more.

Is CVE-2024-28219 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free