Vulnerabilities

Security fix · CVE-2026-112391

Pillow is a Python imaging library.

Published Oct 19, 2026 · catalog updated Oct 26, 2026 · Pillow is a Python

Last checked Oct 31, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-112391. EPSS is 0.58%. Act only if a listed version of Pillow is a Python is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
Medium6.3
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.58%
Remediation
Version ranges on file
Affected products
Bitnami pillow · PyPI pillow · pip Pillow · pypi pillow

### Summary 's can recurse without any limit and crash with an uncaught . It is reachable through when the existing PDF file is attacker-controlled. This is the same class of bug as https://github.com/advisories/GHSA-r73j-pqj5-w3x7 (the /Prev trailer chain loop, fixed earlier this year), in the same file, but in two different functions that fix did not touch. ### Details ** in ** This is a classmethod that takes and has a guard: Every recursive call (nested arrays, dictionaries, indirect object definitions) passes . Since the default and every call site start at -1, this only ever counts down further negative: -1, -2, -3, and so on. It never equals exactly 0, so the guard never runs. A PDF object with a value nested a few thousand levels deep is enough to hit Python's recursion limit. It does not even need a valid tree, since parses the object's own dictionary first, before checking anything else. This advisory reports a single vulnerability: an ineffective recursion-depth guard in (the sentinel default never reaches the check). The mention of GHSA-r73j-pqj5-w3x7 is comparative context for an already-fixed, already-CVE'd bug in a different function — it is not a second vulnerability being reported. The three trigger paths (nested arrays/dicts/indirect objects) are not independently fixable; they share one root cause and one fix location in get_value() . ### Steps to reproduce Both PDFs below are plain text, built directly in Python, no PDF library needed. Expected: a clean . Actual: raises a raw . ### Impact - Availability: an attacker who controls the content of a PDF file that an application later appends an image page to ( ) can crash that request with a RecursionError, using a file of a few hundred bytes. - Confidentiality: none. - Integrity: none. - Pillow cannot open PDFs for reading through . is only reached through the append-mode save path, so the app has to be doing that specific thing (for example, stamping or watermarking an existing PDF) for this to mat

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • Bitnami pillow5.1.0 → 13.0.0
  • PyPI pillow5.1.0 → 13.0.0
  • pip Pillow>= 5.1.0, < 13.0.0
  • pypi pillowversion unspecified

How to fix CVE-2026-112391

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-112391. EPSS is 0.58%. Act only if a listed version of Pillow is a Python is installed.

Which versions are affected?

Compare what you have installed with Pillow >= 5.1.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-835: Infinite Loop. EPSS 0.58%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Technology hubs

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 19, 2026 · NIST NVD

    Detected

    Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can provide a deeply nested PDF to an application that saves an image with PDF append enabled. This can raise an uncaught Recurs

  2. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can provide a deeply nested PDF to an application that saves an image with PDF append enabled. This can raise an uncaught Recurs

  3. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can provide a deeply nested PDF to an application that saves an image with PDF append enabled. This can raise an uncaught Recurs

  4. Oct 21, 2026 · GitHub Advisory Database

    Updated

    ### Summary 's can recurse without any limit and crash with an uncaught . It is reachable through when the existing PDF file is attacker-controlled. This is the same class of bug as https://github.com/advisories/GHSA-r73j-pqj5-w3x7 (the /Prev trailer chain loop, fixed earlier this year), in the same file, but in two different functions that fix did not touch. ### Details ** in ** This is a classme

  5. Oct 26, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  6. Oct 26, 2026 · GitHub Advisory Database

    Fix available

    pillow fixed in 13.0.0

  7. Oct 26, 2026 · GitHub Advisory Database

    Updated

    ### Summary 's can recurse without any limit and crash with an uncaught . It is reachable through when the existing PDF file is attacker-controlled. This is the same class of bug as https://github.com/advisories/GHSA-r73j-pqj5-w3x7 (the /Prev trailer chain loop, fixed earlier this year), in the same file, but in two different functions that fix did not touch. ### Details ** in ** This is a classme

Sources

  • CVE.orgVulnerability recordCVE-2026-112391

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-112391

    30-day exploitation probability 0.58%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-254f-3936-288h

    GitHub Advisory Database record mirrored by OSV.

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-112391

    PdfParser's get_value() can recurse without any limit and crash with an uncaught RecursionError. It is reachable through Image.save(im, fp= , format="PDF", append=True) when the existing PDF file is attacker-controlled. This is the same class of bug as https://github.com/advisories/GHSA-r73j-pqj5-w3x7 (the /Prev trailer chain loop, fixed earlier this year), in the same file, but in two different f

    advisories.gitlab.com
  • NIST NVDVulnerability recordCVE-2026-112391

    Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can prov

    nvd.nist.gov
  • OpenSSF OSV / OSV ScannerPackage advisoryBIT-pillow-2026-112391

    Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tree()

    osv.dev
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-254f-3936-288h

    Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tree()

    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-254f-3936-288h

    Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tree()

    osv.dev

References

Freshness

Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSOct 31, 2026
  • GitHub Advisory DatabaseOct 26, 2026
  • OpenSSF OSV / OSV ScannerOct 26, 2026
  • PyPA Advisory DatabaseOct 26, 2026
  • OpenSSF OSV / OSV ScannerOct 26, 2026
  • GitLab Advisory DatabaseOct 23, 2026
  • CVE.orgOct 21, 2026
  • NIST NVDOct 21, 2026