CVE-2025-48379: Pillow Pillow Vulnerability Can Cause Write Vulnerability
HIGHCVE-2025-48379 is a HIGH (CVSS 7.1) pillow vulnerability can cause write vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Pillow libraries in the PyPI ecosystem. The issue involves pillow vulnerability can cause write buffer overflow on bcn encoding. Remediation is available by upgrading affected packages to version 11.3.0.
CVE-2025-48379 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H).
How to Fix CVE-2025-48379
To remediate this vulnerability, upgrade all affected Pillow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pillow>=11.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pillow
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-48379, inspect your installed packages using pip:
pip show pillow
Analyze the terminal output to locate any version of Pillow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.3.0), your application is affected.
Note: The pip show pillow command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). In Pillow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-48379 Affected Pillow Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pillow
|
PyPI |
≥ 11.2.0
< 11.3.0
|
11.3.0
|
References
Frequently Asked Questions
What is CVE-2025-48379?
Which Pillow versions are affected?
What version fixes CVE-2025-48379?
Is pillow affected?
What is the CVSS score of CVE-2025-48379?
What CWE is associated with CVE-2025-48379?
How can I check PyPI dependencies for CVE-2025-48379?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xg8h-j46f-w952",
"modified" : "2025-07-02T14:20:24Z",
"published" : "2025-07-01T17:29:37Z",
"aliases" : [ "CVE-2025-48379" ],
"summary" : "Pillow vulnerability can cause write buffer overflow on BCn encoding",
"details" : "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. \n\nThis only affects users who save untrusted data as a compressed DDS image. \n\n* Unclear how large the potential write could be. It is likely limited by process segfault, so it's not necessarily deterministic. It may be practically unbounded. \n* Unclear if there's a restriction on the bytes that could be emitted. It's likely that the only restriction is that the bytes would be emitted in chunks of 8 or 16. \n\nThis was introduced in Pillow 11.2.0 when the feature was added.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pillow"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.2.0"
}, {
"fixed" : "11.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/python-pillow/Pillow/security/advisories/GHSA-xg8h-j46f-w952"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48379"
}, {
"type" : "WEB",
"url" : "https://github.com/python-pillow/Pillow/pull/9041"
}, {
"type" : "WEB",
"url" : "https://github.com/python-pillow/Pillow/commit/ef98b3510e3e4f14b547762764813d7e5ca3c5a4"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2025-61.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/python-pillow/Pillow"
}, {
"type" : "WEB",
"url" : "https://github.com/python-pillow/Pillow/releases/tag/11.3.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-122" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-01T17:29:37Z",
"nvd_published_at" : "2025-07-01T19:15:27Z"
}
}