CVE-2026-96638
Medium · 6.5CVSS
6.5
EPSS
0.3%
Published
Oct 21, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular Python image library lets attackers crash programs that open certain image files by making them use far more memory than expected.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
BmpRleDecoder.decode() in Pillow permits crafted RLE BMP delta escapes and absolute-mode runs to append beyond the remaining dest_length without per-branch caps, allowing a kilobyte-sized input to expand a bytearray to hundreds of megabytes and exhaust memory.
Why it matters to the business
Services that accept or process BMP images can be forced offline by memory exhaustion, leading to downtime for image-handling applications and increased operational costs until the workload is restored.
How an attack unfolds
An attacker creates a small BMP file containing RLE delta or absolute-mode sequences that repeatedly exceed dest_length checks; when the target decodes the image the data structure grows unchecked until the process or host runs out of memory.
How to fix it
Upgrade Pillow to version 13.0.0 or later; rebuild and redeploy all dependent applications; consider temporary input-size or format restrictions until the update is complete.
How to confirm the fix worked
Confirm Pillow version is 13.0.0 or newer; run the library test suite against known RLE delta test vectors; monitor memory usage while decoding a set of crafted BMP files.
Typical attack path
- Craft a malicious RLE-encoded BMP file with oversized delta or absolute runs
- Deliver the file via upload, email attachment, or web request
- Trigger Pillow BmpImagePlugin decoding on the file
- Observe repeated unchecked appends that exhaust available memory
How to detect it
Monitor process memory growth and OOM events during image decoding; inspect application logs for repeated BMP decode operations on small files; correlate with inbound BMP uploads or attachments.
What your security team should do
- Immediately upgrade all Pillow installations to 13.0.0
- Add file-type and size validation before image decoding
- Enable resource limits on worker processes that handle untrusted images
- Review and restrict BMP support if the format is not required
The record
Pillow is a Python imaging library. From 9.1.0 until 13.0.0, BmpRleDecoder.decode() in src/PIL/BmpImagePlugin.py permits crafted RLE BMP delta escapes and absolute-mode runs to append beyond the remaining dest_length without a per-branch cap. A delta can add roughly 255 image rows in one iteration, so a kilobyte-sized file with a large but permitted width can expand the data bytearray to hundreds of megabytes or more, causing memory-exhaustion denial of service. This issue is fixed in version 13.0.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-63341 Aedes is an MQTT broker that can run on any stream server. CWE-400
- CVE-2026-62300 Filecoin Pin is an IPFS Pinning Service API implementation that pins to Filecoin's PDP… CWE-400
- CVE-2026-62254 LibreDWG is a free C library to read and write DWG files. CWE-400
- CVE-2026-62250 LibreDWG is a free C library to read and write DWG files. CWE-400
- CVE-2026-62303 Pistache is a high-performance REST toolkit written in C++. CWE-400
- CVE-2026-62160 Daptin is a GraphQL/JSON-API headless CMS. CWE-400
- CVE-2026-61848 Crass is a Ruby CSS parser that's fully compliant with the CSS Syntax Level 3… CWE-400
- CVE-2026-61854 VoiceSentinel is a real-time voice moderation system for Minecraft servers. CWE-400