CVE-2026-112893: Pillow: Invalid free in FreeType glyph rendering when a stroker is active
Pillow is a Python imaging library. From 10.0.0 until 13.0.0, Pillow can free an invalid glyph pointer during FreeType rendering with an active stroker. If FTLoadGlyph fails, cleanup may call FTDoneGlyph on an uninitialized or stale glyph variable. An attacker can supply a malformed font as untrusted bytes to an application that draws text with a nonzero stroke width, forcing the glyph-load failure path. This can corrupt memory or crash the process. This issue is fixed in version 13.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Pillowto a version that resolves this vulnerability.Fixed in 13.0.0
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using Pillow versions from 10.0.0 up to, but not including, 13.0.0 are exposed when they render text from attacker-supplied malformed font bytes with a nonzero stroke width. Applications that do not process untrusted fonts or do not use an active stroker are not described as reaching the vulnerable path.
What does an attacker need to do to trigger the flaw?
An attacker needs to provide malformed font data to an application that uses Pillow's FreeType glyph rendering with a nonzero stroke width. The malformed font must cause FT_Load_Glyph to fail, which reaches the unsafe cleanup path.
What is the likely impact if exploitation succeeds?
The invalid glyph free can corrupt process memory or crash the process. The supplied CVSS vector indicates the primary assessed impact is on availability.
What should be done if an immediate upgrade is not possible?
Avoid rendering text from untrusted font bytes, particularly when using a nonzero stroke width. Rejecting or isolating untrusted font processing can prevent the described trigger path until Pillow can be updated.
How can I determine whether my deployment is affected?
Check the installed Pillow version and whether the application accepts untrusted font data for text rendering with stroke width enabled. Versions 10.0.0 through before 13.0.0 meet the affected version range; version 13.0.0 contains the fix.