Skip to main content

Pillow EUVDEUVD-2026-104604

| CVE-2026-112394 MEDIUM
Buffer Over-read (CWE-126)
2026-10-19 GitHub_M GHSA-4558-3h8r-v8xp
6.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted buffer with P;2L/P;4L rawmode
  2. Exploit
    Trigger out-of-bounds read in ImagingRawDecode
  3. Impact
    Disclose adjacent heap bytes or crash process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer over-read prevention
Exploitation Conditions

Exploitation requires that the target application decode attacker-controlled data through Pillow's raw decoder using the planar palette raw modes 'P;2L' or 'P;4L' (for example via Image.frombuffer or Image.frombytes), supplying a buffer and image dimensions whose accepted packed-row size is smaller than the unpacker's padded bit-plane footprint. Limiting factors that reduce real-world exposure: these planar palette raw modes are uncommon and must be explicitly selected by the calling application rather than being triggered by ordinary image-file opening/auto-detection; the impact is bounded to leaking up to three adjacent heap bytes or a process crash, with no code execution or integrity loss. The AT:P metric in the vendor vector reflects this required non-default decoding configuration.

Impact

This is a genuine but moderate-severity memory-safety defect (CWE-126 buffer over-read), not a top-tier priority. The provided CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L, score 6.3) correctly signals a network-reachable, unauthenticated issue with LOW confidentiality and LOW availability impact and NO integrity impact - consistent with the description's claim of disclosing up to three adjacent heap bytes or crashing the process. The pivotal and easily-overlooked metric is AT:P (Attack Requirements: Present): exploitation is not against a passively-parsed image file but requires the application to invoke Pillow's raw decoder with the uncommon 'P;2L' or 'P;4L' rawmodes while passing attacker-influenced buffer contents and dimensions. No EPSS score was provided in the input, so probabilistic exploitation likelihood cannot be quantified. This CVE is NOT in CISA KEV and no public exploit code was supplied, so exploitation status is 'no public exploit identified at time of analysis'; note the fix commit and its regression tests publicly demonstrate the triggering conditions, which lowers the barrier to crafting a POC even though none is cited here. Net: real but low-to-moderate real-world risk - the modest impact ceiling (a few bytes of heap disclosure or a crash) combined with the atypical API precondition means this ranks well below a remote code execution flaw despite Pillow's enormous install base.

Exploit ScenarioDerived

An application exposes an endpoint that constructs a Pillow image from user-supplied bytes using Image.frombuffer/frombytes with the 'P;2L' or 'P;4L' raw mode and attacker-influenced dimensions. The attacker submits a buffer whose accepted size is smaller than the unpacker's actual padded-bit-plane footprint, causing ImagingRawDecode to read past the buffer end and either leak up to three adjacent heap bytes into the decoded output or crash the process. No public exploit is identified at time of analysis, though the fix's regression tests publicly illustrate the exact size/mode combinations that trigger the condition.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Out-of-bounds heap read in Pillow prior to 13.0.0 lets unauthenticated remote attackers disclose up to three adjacent heap bytes or crash the process, but only when the application explicitly decodes attacker-controlled data using the uncommon planar palette raw modes P;2L or P;4L. This is a genuine but moderate-severity CWE-126 memory-safety defect rather than a top-tier priority: these raw modes are not reached by ordinary image-file opening or auto-detection, and impact is bounded to limited information disclosure or denial of service with no code execution or integrity loss. No public exploit identified at time of analysis; the provided intelligence contains no KEV listing and no POC reference.

RemediationAI

Upgrade to Pillow 13.0.0 or later; the vendor-released patch is version 13.0.0, documented at https://github.com/python-pillow/Pillow/releases/tag/13.0.0, with the advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-4558-3h8r-v8xp and fixing commit https://github.com/python-pillow/Pillow/commit/392ee6f0d19a4adb766a63e9a99f3c28193b8d31. If upgrading cannot be done immediately, disable or reject application paths that pass untrusted data to Image.frombuffer or Image.frombytes with raw modes P;2L or P;4L, since ordinary image opening and auto-detection do not reach these planar palette modes. As a compensating application-level control, require the supplied buffer length to be at least planes * ((xsize + 7) / 8) for those modes before invoking the raw decoder; this may reject intentionally truncated or non-conforming streams, requires custom validation in the calling application, and does not repair the underlying C size-accounting bug. Running decoding of untrusted input in a constrained subprocess can limit crash and denial-of-service blast radius, but it adds operational overhead and does not prevent the limited heap-byte disclosure.

Affected VersionsENISA

Pillow < 13.0.0

Affected Packages

pypi pillow fix: 13.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is a size-accounting mismatch in Pillow's ImagingRawDecode path for planar palette raw modes P;2L and P;4L. The decoder calculates a packed-pixel row size from bits and xsize, while the corresponding unpackers read separately padded bit planes sized as planes * ((xsize + 7) / 8), so a caller-supplied buffer and image dimensions can pass the accepted-length check even though the unpacker's actual footprint is larger. That produces an out-of-bounds heap read of up to three adjacent bytes, which may be exposed in output pixels or cause a process crash; the available data describes no write primitive, code execution, or integrity impact. The affected CPE is python-pillow:pillow before 13.0.0. The upstream fix commit 392ee6f0d19a4adb766a63e9a99f3c28193b8d31 changes src/decode.c _setimage to compute the planar footprint, rejects P;2L and P;4L in _putpalette_impl, removes the old coarse modulo check from Image.frombytes, and adds regression tests for truncated buffers and decoder buffer sizing. The CVSS 4.0 vendor vector shows AT:P, while the assessed CVSS 3.1 vector is AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L, consistent with remote but non-default decoding configuration being required.

Know when Pillow gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.8 MEDIUM

AC:H reflects the required non-default P;2L/P;4L raw mode plus a crafted size mismatch (the 4.0 AT:P requirement); PR:N/UI:N as the decode call needs no auth, C:L for a few leaked heap bytes, A:L for the crash, I:N.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 19, 2026 - 22:03 EUVD
CVE Published
Oct 19, 2026 - 20:48 cve.org
MEDIUM 6.3

DescriptionCVE.org

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's P;2L and P;4L raw decoders can read past the end of an input buffer. ImagingRawDecode calculates a packed-pixel row size, while the unpackers read separately padded bit planes. A caller can supply a buffer and image dimensions whose accepted size is smaller than the unpacker's actual footprint. This can disclose up to three adjacent heap bytes in output pixels or crash the process. This issue is fixed in version 13.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 89,616 pypi packages depend on pillow (20,283 direct, 70,825 indirect)

Ecosystem-wide dependent count for version 13.0.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
Pillow is one of the most widely deployed Python imaging libraries
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2021-23437 HIGH POC
7.5 Sep 03

The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb

CVE-2025-48379 HIGH POC
7.1 Jul 01

Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a

CVE-2016-4009 CRITICAL
9.8 Apr 13

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote

CVE-2014-3007 CRITICAL
10.0 Apr 27

Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v

CVE-2026-96639 CRITICAL
9.8 Oct 21

Pillow versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima

CVE-2021-34552 CRITICAL
9.8 Jul 13

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters

CVE-2021-25289 CRITICAL
9.8 Mar 19

An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy