CVE-2025-48379: Pillow Vulnerable to Write Buffer Overflow on BCn encoding

Published Jul 1, 2025
·
Updated

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.

Other sources

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.

IBM

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.

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. 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.

This was introduced in Pillow 11.2.0 when the feature was added.

GitHub

Affected Software

3 affected componentsFixes available
pip/pillow>=11.2.0<11.3.0
11.3.0
Python Pillow=11.2.1
IBM watsonx.data intelligence<=5.2.0, 5.2.1, 5.2.2, 5.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pillow to a version that resolves this vulnerability.

    Fixed in 11.3.0
  2. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 11.3.0
  3. Configuration

    Avoid using Pillow to save untrusted data as a compressed DDS image (the overflow affects saving sufficiently large DDS images with default settings).

    Pillow (DDS saving) DDS write of untrusted data (compressed DDS) = Do not save untrusted data as compressed DDS images
  4. Compensating control

    If you must process DDS inputs, isolate the process that calls Pillow (e.g., run it in a sandbox/container with limited permissions) to reduce impact of a potential segfault from the heap buffer overflow.

Event History

Jul 1, 2025
Advisory Published
via GitHub·05:29 PM
Data Sourced
via GitHub·05:29 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·06:33 PM
Data Sourced
via MITRE·06:33 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:15 PM
RemedyAffected Software
Jun 24, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-48379?

CVE-2025-48379 has a critical severity level due to the potential for a heap buffer overflow.

2

How do I fix CVE-2025-48379?

To fix CVE-2025-48379, upgrade to pillow version 11.3.0 or later.

3

Which versions of pillow are affected by CVE-2025-48379?

CVE-2025-48379 affects pillow versions between 11.2.0 and 11.2.0 inclusive.

4

What types of data are vulnerable in CVE-2025-48379?

CVE-2025-48379 is exploitative when saving untrusted data as compressed DDS images.

5

What is the underlying cause of CVE-2025-48379?

CVE-2025-48379 is caused by a heap buffer overflow due to insufficient space checks when writing large DDS images.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203