Python-pillow Pillow
Pillow: Heap buffer overflow in ImagingJpegDecode
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's JPEG decoder can write a full-width scanline into a buffer sized for a requested draft scale. ImagingJpegDecode does not verify libjpeg's actual output width and component count after scaling is requested, and an 8-bit lossless SOF3 JPEG decoded by a build linked to libjpeg-turbo 3.x can ignore the requested downscaling geometry. An attacker can supply such a JPEG to an application that uses draft() or thumbnail() to request downscaling. This can corrupt heap memory, crash the process, or potentially allow code execution. Older libjpeg-turbo 2.x and IJG builds reject the SOF3 input. This issue is fixed in version 13.0.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 13.0.0
Fixed in 13.0.0
Mitigation
Upgrade Pillow to 13.0.0 or later.
References
- Vendor advisory github.com/python-pillow/Pillow/security/advis…
- Patch github.com/python-pillow/Pillow/commit/242a059…
- Release notes github.com/python-pillow/Pillow/releases/tag/1…
Timeline
Days relative to CVE publicationFirst public PoC 3.5 days after publication; not in CISA KEV. First PoC: al4n4n/CVE-2026-112403 (created 23 Oct 2026, found by us: 14 Nov 2026).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| al4n4n/CVE-2026-112403 | 23 Oct 2026 +3.5 d | 14 Nov 2026 | 0 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /upload
- Body markers
name="image"in{var}- Ports
- 8080, 8081
- Seen in
- 1 repo: al4n4n/CVE-2026-112403
- Evidence
- al4n4n/CVE-2026-112403/check.py:160 al4n4n/CVE-2026-112403/poc.py:46 al4n4n/CVE-2026-112403/verify.py:78
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/upload(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8080,8081] (msg:"GG PoC-Monitor CVE-2026-112403 python-pillow Pillow exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/upload"; http.request_body; content:"name=|22|image|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-112403; classtype:web-application-attack; sid:9291860; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: python-pillow Pillow exploit attempt (CVE-2026-112403)
id: gg-pocmon-cve-2026-112403-9291860
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-112403. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-112403
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/upload'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.112403