Vulnerabilities

Security fix · CVE-2026-112393

Pillow is a Python imaging library.

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

Last checked Oct 30, 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-112393. EPSS is 1.02%. 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
Critical9.2
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
1.02%
Remediation
Version ranges on file
Affected products
PyPI pillow · pip Pillow · pypi pillow

Pillow can write attacker-chosen data past the end of a heap buffer when it saves a TIFF image to an in-memory destination such as rather than to a file. The same code also copies leftover heap memory from the process into the saved file. Anyone who can supply an image to a service that opens it and re-saves it as TIFF this way can trigger this with default settings. The attached reproducer crashes the process, and the overflow could potentially be developed further, but code execution is not demonstrated here. The bug is in in . This is the write callback for the in-memory sink that Pillow gives libtiff whenever the save target has no . While writing the directory, libtiff seeks past the current end of data and writes tag values there. sizes its from instead of from the write position . As a result, the first out-of-line tag value written after that seek can run past the allocation by up to the size of the directory: 12 bytes per entry, 126 bytes in the minimal case, and 2384 bytes observed with a 331-entry directory. The overflowing bytes are the tail of a tag value taken from the uploaded file. No save options are needed, because compression and tags are inherited from the source image. The overflow does require an attacker-sized out-of-line tag to reach libtiff. That happens when the opened TIFF is saved directly (ImageDescription, DocumentName or XMP), or through an embedded ICC profile, which survives in . The bytes libtiff skips for alignment are never initialised, so any compressed TIFF over 64 KiB written this way also leaks one stale heap byte per padding hole. That leak needs no crafted tag. The attached reproducer builds a 131 KB PackBits TIFF and runs . Saving the same image to a file path succeeds, but the save aborts with glibc's . A second part of the script shows uninitialised heap bytes at the padding offsets of a save that are zero in the file save. Saves to real files are unaffected. The defect dates to e782fe721e01 (2013) and has been present si

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.

  • PyPI pillow2.0.0 → 13.0.0
  • pip Pillow>= 2.0.0, < 13.0.0
  • pypi pillowversion unspecified

How to fix CVE-2026-112393

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-112393. EPSS is 1.02%. Act only if a listed version of Pillow is a Python is installed.

Which versions are affected?

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

What should an analyst verify?

CWE-122: Heap-based Buffer Overflow. EPSS 1.02%. 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 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, allowing an attacker-controlled out-of-line TIFF tag or

  2. Oct 19, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, allowing an attacker-controlled out-of-line TIFF tag or

  3. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, allowing an attacker-controlled out-of-line TIFF tag or

  4. Oct 21, 2026 · GitHub Advisory Database

    Updated

    Pillow can write attacker-chosen data past the end of a heap buffer when it saves a TIFF image to an in-memory destination such as rather than to a file. The same code also copies leftover heap memory from the process into the saved file. Anyone who can supply an image to a service that opens it and re-saves it as TIFF this way can trigger this with default settings. The attached reproducer crashe

  5. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  6. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  7. Oct 26, 2026 · PyPA Advisory Database

    Updated

    Pillow can write attacker-chosen data past the end of a heap buffer when it saves a TIFF image to an in-memory destination such as rather than to a file. The same code also copies leftover heap memory from the process into the saved file. Anyone who can supply an image to a service that opens it and re-saves it as TIFF this way can trigger this with default settings. The attached reproducer crashe

Sources

  • CVE.orgVulnerability recordCVE-2026-112393

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-112393

    30-day exploitation probability 1.02%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-332p-7hrc-92wf

    Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO

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

    ============================================================================ Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO Location: src/libImaging/TiffDecode.c:94 in _tiffWriteProc() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ============================================================================ Pillow can write attacker-chosen data past the end of a heap buffer w

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

    Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation fr

    nvd.nist.gov
  • PyPA Advisory DatabasePackage advisoryGHSA-332p-7hrc-92wf

    Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO

    osv.dev

References

Freshness

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

  • FIRST EPSSOct 30, 2026
  • PyPA Advisory DatabaseOct 26, 2026
  • GitLab Advisory DatabaseOct 23, 2026
  • GitHub Advisory DatabaseOct 22, 2026
  • CVE.orgOct 21, 2026
  • NIST NVDOct 21, 2026