CVE-2025-48379Pillow Vulnerable to Write Buffer Overflow on BCn encoding
Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a sufficiently large (>64k encoded with default settings) image in the DDS format due to writing into a buffer without checking for available space. This only affects users who save untrusted data as a compressed DDS image. This issue has been patched in version 11.3.0.
What to do
Fixed builds are available from Alpine, PyPI: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | pillow | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | pillow | Not affected vulnerable_code_not_present | ||
| Red Hat Enterprise Linux 8 | python-pillow | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pillow | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pillow-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pillow-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-pillow-tk | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow-doc | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow-qt | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow-sane | Not affected | ||
| Red Hat Enterprise Linux 7 | python-pillow-tk | Not affected | ||
| Alpine Linux 3.24 | py3-pillow | Fixed | 11.3.0-r0 | ALPINE-CVE-2025-48379 |
| Alpine Linux 3.23 | py3-pillow | Fixed | 11.3.0-r0 | ALPINE-CVE-2025-48379 |
| PyPI library | pillow | Fixed | 11.3.0 | GHSA-xg8h-j46f-w952 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- python-pillow Pillow: affected: >= 11.2.0, < 11.3.0
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-xg8h-j46f-w952
- https://github.com/python-pillow/Pillow/pull/9041
- https://github.com/python-pillow/Pillow/commit/ef98b3510e3e4f14b547762764813d7e5ca3c5a4
- https://github.com/python-pillow/Pillow/releases/tag/11.3.0
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.