PillowApplication · Python

CVE-2026-54058

CRITICAL · 9.1 CVSS v3.1 Published 2026-07-14
Fix available
A fix is available. Upgrade to 12.3.0 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click 5 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Pillow is a Python imaging library. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA image from a filename through the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access such as Image.tobytes(), getpixel, convert, or save to read beyond the mapped region and disclose adjacent process memory or fault. This issue is fixed in version 12.3.0.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A heap buffer over-read vulnerability in Pillow's McIdas AREA image loader allows attacker-controlled header values to set a row stride smaller than the actual row width. During pixel operations (Image.tobytes(), getpixel, convert, save), this causes out-of-bounds memory reads beyond the mapped image region, potentially disclosing adjacent process memory or causing segmentation faults.

MitigationUpgrade Pillow to version 12.3.0 or later. Until upgraded, avoid processing untrusted or unknown McIdas AREA image files.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
PillowApplication
Affected:< 12.3.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Pillow version
    Run 'python -c "import PIL; print(PIL.__version__)"' or check pip list for Pillow version
    Affected if version is lower than 12.3.0 (the fixed release)
  2. Locate Pillow installation path
    Run 'python -c "import PIL; print(PIL.__file__)"' to find where PIL/Pillow is installed
    Affected if Pillow is present in the environment regardless of version (for further inspection)
  3. Check for McIdas AREA image file processing
    Search codebase or logs for references to '.area' files or 'McIdas' image loading using PIL/Pillow (e.g., Image.open('*.area'))
    Affected if Application code loads or processes McIdas AREA format image files
  4. Inspect image processing configurations
    Review application configuration files or environment variables for Pillow-related settings that enable/disable specific image format loaders
    Affected if McIdas AREA loader is enabled or auto-detection is used on untrusted input
  5. Scan for suspicious AREA files in input directories
    Check directories where untrusted image uploads or external image files are stored for .area file extensions
    Affected if Untrusted or unknown McIdas AREA files may be present in the environment

Affected if Pillow version is below 12.3.0 AND the application processes McIdas AREA image files, since the vulnerability is triggered during pixel operations on malformed AREA images with attacker-controlled header values.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 12.3.0 or later
Fixed in 12.3.0
Interim mitigation

Upgrade Pillow to version 12.3.0 or later. Until upgraded, avoid processing untrusted or unknown McIdas AREA image files.

Recommended fix High confidence

12.3.0

  1. Identify the current Pillow version in your environment by running `pip show pillow` or checking your requirements file
  2. Upgrade Pillow to version 12.3.0 or later using `pip install --upgrade Pillow>=12.3.0`
  3. Verify the upgrade was successful by running `pip show pillow` and confirming the version number
  4. If you use dependency pinning, update your requirements file to specify `Pillow>=12.3.0`
  5. Test your application to ensure image loading functionality works correctly after the upgrade
Caveat Pillow 12.x may have breaking changes from earlier versions; review the Pillow 12.x release notes for any migration requirements

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Pillow Scoped from the published advisory
  • Consultation2.0 h
  • Implementation1.0 h
  • Testing4.0 h
  • Review / QA2.0 h
9.0 hours of engineering $1,540
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,464.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-54058 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-54058 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data