Use After Free Affecting pillow package, versions [,13.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.44% (37th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PILLOW-21277784
  • published20 Oct 2026
  • disclosed19 Oct 2026
  • creditUnknown

Introduced: 19 Oct 2026

NewCVE-2026-112402  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade pillow to version 13.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Use After Free via ImagingScaleAffine() in src/libImaging/Geometry.c, which deletes a caller-owned output image when its lookup-table allocation fails. When _resize() calls ImagingTransform() and the internal affine transform encounters a memory allocation failure, the output image is freed both inside ImagingScaleAffine() and again by the caller, resulting in a double free that crashes the process. A remote attacker can trigger this condition by supplying an image that causes a memory allocation failure during resize operations, crashing the application.

CVSS Base Scores

version 4.0
version 3.1