Vulnerabilities

Security fix · CVE-2026-112395

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-112395. EPSS is 0.51%. 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.5
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.51%
Remediation
Version ranges on file
Affected products
PyPI pillow · pip pillow

### Summary Pillow's libImaging decoder, used to decode tiled TIFF images, allocates a per-tile buffer using . After each it then iterates from 0 up to and calls the configured row unpacker (here ) with the source pointer . When libtiff returns a smaller than the worst-case , the inner stride-and-copy loop walks past the realloc'd region and performs a 1024-byte that reads up to bytes from a buffer sized only to . The supplied PoC TIFF triggers a 1024-byte over-read exactly 0 bytes past a 196608-byte allocation. An attacker who can convince a Pillow-using application to decode a crafted TIFF can trigger a process crash (DoS) and may cause adjacent heap memory to be copied into the decoded pixel buffer. ### Details Pillow's TIFF decoder, when libtiff reports the file is tiled, takes the path. The function: 1. Asks libtiff for (the bytes-per-tile) and (the bytes per row *as stored by libtiff*). 2. Reallocates to exactly . 3. For each tile origin and each plane, calls into , then walks the tile row by row, calling the configured (here ) on each row's worth of source bytes. The validation done before the loop is: This rejects oversized libtiff tiles, but it does **not** reject *undersized* ones — i.e. the case where libtiff returns a strictly **less** than . The loop body, however, indexes into the buffer assuming the buffer is at least bytes long. ### Vulnerable Code The PoC's tile metadata yields , (4 bytes/pixel × 256 pixels), and (which is 256·256·3 = three-channel-byte storage). The realloc'd buffer is 196608 bytes. The unpacker iterates from 0 to 255 and for the highest rows the source pointer already lies at or past offset 196608 — the very last row's reads 1024 bytes starting bytes past the allocation; ASAN flags the very first byte past the heap region ( ). The mismatch is real: libtiff's returns the *packed* per-tile storage (which depends on the file's photometric/separation layout — it can legitimately be smaller than ), while the inner loop strides as if th

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 pillow8.2.0 → 13.0.0
  • pip pillow>= 8.2.0, < 13.0.0

How to fix CVE-2026-112395

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

Which versions are affected?

Compare what you have installed with 8.2.0 → 13.0.0, >= 8.2.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 0.51%. 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 8.2.0 until 13.0.0, Pillow's tiled-TIFF decoder can read past the tile buffer while copying four-byte pixels. In _decodeTile, libtiff can return a tile allocation smaller than the required row stride multiplied by the tile length, and Pillow's stride-and-copy loop walks beyond that allocation. An attacker can supply a crafted tiled TIFF to an application th

  2. Oct 20, 2026 · NIST NVD

    Updated

    Pillow is a Python imaging library. From 8.2.0 until 13.0.0, Pillow's tiled-TIFF decoder can read past the tile buffer while copying four-byte pixels. In _decodeTile, libtiff can return a tile allocation smaller than the required row stride multiplied by the tile length, and Pillow's stride-and-copy loop walks beyond that allocation. An attacker can supply a crafted tiled TIFF to an application th

  3. Oct 20, 2026 · GitHub Advisory Database

    Updated

    ### Summary Pillow's libImaging decoder, used to decode tiled TIFF images, allocates a per-tile buffer using . After each it then iterates from 0 up to and calls the configured row unpacker (here ) with the source pointer . When libtiff returns a smaller than the worst-case , the inner stride-and-copy loop walks past the realloc'd region and performs a 1024-byte that reads up to bytes from a buffe

  4. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  5. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  6. Oct 26, 2026 · PyPA Advisory Database

    Updated

    ### Summary Pillow's libImaging decoder, used to decode tiled TIFF images, allocates a per-tile buffer using . After each it then iterates from 0 up to and calls the configured row unpacker (here ) with the source pointer . When libtiff returns a smaller than the worst-case , the inner stride-and-copy loop walks past the realloc'd region and performs a 1024-byte that reads up to bytes from a buffe

Sources

  • CVE.orgVulnerability recordCVE-2026-112395

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-112395

    30-day exploitation probability 0.51%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-462x-pgg6-55fp

    Pillow tiled-TIFF decoder reads past tile buffer in copy4 (Unpack.c:1290)

    github.com
  • NIST NVDVulnerability recordCVE-2026-112395

    Pillow is a Python imaging library. From 8.2.0 until 13.0.0, Pillow's tiled-TIFF decoder can read past the tile buffer while copying four-byte pixels. In _decodeTile, libtiff can return a tile allocation smaller than the required row stride multiplied by the tile length, and Pill

    nvd.nist.gov
  • PyPA Advisory DatabasePackage advisoryGHSA-462x-pgg6-55fp

    Pillow tiled-TIFF decoder reads past tile buffer in copy4 (Unpack.c:1290)

    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
  • GitHub Advisory DatabaseOct 21, 2026
  • CVE.orgOct 21, 2026
  • NIST NVDOct 21, 2026