CVE-2026-112401: Pillow: Quadratic GIF comment concatenation allows DoS in Image.open()

Published Oct 19, 2026
·
Updated

Pillow is a Python imaging library. From 5.4.0 until 13.0.0, Pillow performs quadratic copying while parsing GIF comments. GifImageFile.seek() repeatedly appends immutable bytes for comment sub-blocks and multiple comment extensions, and frame zero is parsed during Image.open(). An attacker can submit a small-dimension GIF containing many comment extensions to any application that opens the file. This can consume excessive CPU and deny service before the application can inspect the image. This issue is fixed in version 13.0.0.

Affected Software

1 affected component
pypi/Pillow>=5.4.0<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·09:15 PM
Data Sourced
via MITRE·09:15 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using Pillow versions from 5.4.0 through versions before 13.0.0 are exposed if they open attacker-controlled GIF files. The issue is triggered while parsing frame zero during Image.open(), before the application can inspect the image.

2

What must an attacker provide to trigger the denial of service?

An attacker needs to submit a GIF crafted with many comment extensions or comment sub-blocks. The GIF can have small image dimensions, so dimension-based checks alone do not prevent the excessive CPU consumption.

3

Is authentication or user interaction required for exploitation?

No. The supplied CVSS vector indicates network reachability with low attack complexity and no privileges or user interaction required, provided an application opens the attacker-supplied GIF.

4

What version fixes the issue?

Pillow 13.0.0 fixes the quadratic copying behavior. Upgrade deployments using affected Pillow releases to version 13.0.0.

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