AI Science Tracker

Pillow JPEG draft scaling leaves unchecked lossless output geometry and overflows decode buffer

Pillow JPEG decoder with libjpeg-turbo 3.x · AI involvement attributed to Claude (model/version not identified)

Finding and attribution

Pillow’s JPEG draft/thumbnail path sizes a row buffer for a downscaled image. With lossless SOF3 JPEG supported by libjpeg-turbo 3.x, the decoder ignores the requested scaling and returns full-width scanlines; Pillow does not verify the actual output geometry before decoding. The scanline write therefore exceeds the heap buffer. The advisory reports attacker-controlled overflow bytes, but does not establish arbitrary code execution. It affects paths using draft before load; decoder builds against libjpeg-turbo 2.x or IJG libjpeg reject this format before the bug.

Product: Pillow JPEG decoder with libjpeg-turbo 3.x. AI system: Claude (model/version not identified). Team / organization: Anthropic and Ada Logics; python-pillow maintainers.

CVE identifiers: CVE-2026-112403.

AI and human contribution (source account): The primary Pillow security advisory explicitly states the issue was found by Anthropic using Claude to study open-source software and manually validated by Ada Logics. The model version is not identified.

Human involvement is only described where the source account establishes it; unknown involvement does not mean none. Vendor confirmation of a flaw does not confirm every claim about AI contribution.

Discovery context: The advisory was publicly published Oct 17, 2026, and specifies a 90-day coordinated disclosure window. It rates the issue High. No exploitation claim is made; the reported overflow primitive is not summarized as RCE.

Remediation status: fix documented. Fixed in Pillow 13.0.0. The advisory notes that loading before thumbnailing or setting reducing_gap=None avoids the affected draft path; builds against libjpeg-turbo 2.x or IJG libjpeg are not affected. Upgrade to the fixed Pillow release. Deployment status is not checked.

A source-documented fix does not establish installed patches or current safety. Source checking does not independently reproduce the finding or establish observed exploitation.

Disclosed 17 Oct 2026. AI attribution dated 17 Oct 2026. Sources checked 14 Nov 2026; these are separate dates, not a live installation check.

Recorded CVSS: Critical · highest recorded score 9.2. Documented technical effects: code execution, denial of service.

Severity, consequences and exploitation evidence

Case grouping uses the highest recorded CVSS score, with its version-specific severity band. It is descriptive, not a combined or editorial risk index. All recorded assessments remain below; scores from different versions and sources may disagree. CVSS specifications define version-specific scoring and severity bands.

  • CVE-2026-112403: CVSS 4.0 · 9.2 (Critical) · CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N. GitHub_M (CNA; CVE Program record) · checked 16 Nov 2026.

CVE-2026-112403: code execution, denial of service.
Prerequisites / affected scope: CNA description: 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..
Exploitation evidence: Exploitation in the wild is not established by the cited description.. Impact source · checked 16 Nov 2026.

Documented fix: Fixed in Pillow 13.0.0. The advisory notes that loading before thumbnailing or setting reducing_gap=None avoids the affected draft path; builds against libjpeg-turbo 2.x or IJG libjpeg are not affected. Upgrade to the fixed Pillow release. Deployment status is not checked.

Original evidence

Download this source record (JSON)

Open this case in the interactive tracker · Browse all static security cases