CVE-2026-112394: Pillow: P;2L and P;4L decoders may read 1 to 3 bytes past the passed buffer size

Published Oct 19, 2026
·
Updated

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 Software

1 affected component
pypi/Pillow<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 19, 2026
CVE Published
via MITRE·08:48 PM
Data Sourced
via MITRE·08:48 PM
DescriptionWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using Pillow versions before 13.0.0 are affected when they invoke the P;2L or P;4L raw decoders with attacker-controlled or otherwise untrusted buffer content and image dimensions.

2

What can an attacker do, and what access is required?

An unauthenticated attacker may be able to supply a crafted buffer and dimensions that pass the initial size check but cause reads beyond the buffer. This can expose up to three adjacent heap bytes through output pixels or crash the process.

3

Is there a fix?

Upgrade Pillow to version 13.0.0, which fixes the P;2L and P;4L raw decoder out-of-bounds read.

4

What is the risk if patching cannot happen immediately?

Avoid processing untrusted inputs through the P;2L and P;4L raw decoders, particularly where callers can control both the input buffer and image dimensions. The described impact is limited to disclosure of up to three adjacent heap bytes or process crashes.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203