Skip to content

← Actionable
Medium, CVSS 6.9amended

Pillow: EPS load(scale) lets Ghostscript render past the decompression bomb limit

CVE-2026-112899GHSA-vx6w-vv9f-6gvg

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (pillow 13.0.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI pillow

    Affected
    >= 2.3.0, <= 12.3.0
    Fixed in
    13.0.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.9 · CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N · score source
EPSS
No dated EPSS signal available.
Source description

As published by the source; long descriptions are shortened.

When an application opens an untrusted Encapsulated PostScript file and asks Pillow to render it at a larger scale, Pillow has Ghostscript produce an image several times bigger than Pillow's configured size limit allows. The size check runs only after Ghostscript has finished rendering and written the full raw image to a temporary file. An attacker who can upload a file of about 100 bytes makes each such request spend scale² times the Ghostscript rendering work and temporary disk space that the limit is meant to permit. For example, at scale 2 that is a 972 MB temporary file. The cause is in Ghostscript() in src/PIL/EpsImagePlugin.py. It multiplies the file-declared size by the caller's scale (lines 93-94) and passes the product to gs as the -g output geometry. It never calls Image.decompressionbombcheck() on the scaled size. The only check is the one Image.open() ran on the unscaled size, so a file declaring 9000×9000 passes, and load(scale=2) then asks Ghostscript for 18000×18000…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 4 · amended ·

    Amended from ghsa record GHSA-vx6w-vv9f-6gvg

  2. Revision 3 · amended ·

    Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.

  3. Revision 2 · amended ·

    Amended from osv record GHSA-vx6w-vv9f-6gvg

  4. Revision 1 · created ·

    Published from ghsa record GHSA-vx6w-vv9f-6gvg

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-112899

Advisory: Pillow: EPS load(scale) lets Ghostscript render past the decompression bomb limit
IDs: CVE-2026-112899, GHSA-vx6w-vv9f-6gvg
Record: https://patchnext.com/advisories/cve-2026-112899 (revision 4, source checked 26 Oct 2026, 13:55 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.9)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: pillow 13.0.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI pillow: affected >= 2.3.0, <= 12.3.0; fixed in 13.0.0

## Suggested inspection (read-only)
- `python -m pip show pillow`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on pillow.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-vx6w-vv9f-6gvg (GitHub-reviewed advisory GHSA-vx6w-vv9f-6gvg lists affected ranges: PyPI pillow >=2.3.0 <=12.3.0)
- Verified: https://osv.dev/vulnerability/GHSA-vx6w-vv9f-6gvg (OSV record GHSA-vx6w-vv9f-6gvg lists affected ranges: PyPI pillow >=2.3.0 <13.0.0 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…