---
id: CVE-2026-112394
title: >-
  Pillow: P;2L and P;4L decoders may read 1 to 3 bytes past the passed buffer
  size
summary: >-
  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…
severity: medium
cvss: 6.3
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-126
vendor: python-pillow
product: Pillow
affected:
  - Pillow < 13.0.0
published: '2026-10-19'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T20:48:28.141Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-112394'
references:
  - url: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-4558-3h8r-v8xp
    label: >-
      https://github.com/python-pillow/Pillow/security/advisories/GHSA-4558-3h8r-v8xp
  - url: >-
      https://github.com/python-pillow/Pillow/commit/392ee6f0d19a4adb766a63e9a99f3c28193b8d31
    label: >-
      https://github.com/python-pillow/Pillow/commit/392ee6f0d19a4adb766a63e9a99f3c28193b8d31
  - url: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
    label: 'https://github.com/python-pillow/Pillow/releases/tag/13.0.0'
tags:
  - cve.org
ingestedAt: '2026-10-19T21:43:56.153Z'
---

## Overview

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.

## Affected

- `Pillow < 13.0.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
