CVE-2026-59991 psd-tools: Uncontrolled memory allocation in psd-tools composite/numpy via crafted PSD geometry
Attackers can cause out-of-memory crashes in applications using psd-tools by providing crafted PSD files with invalid geometry.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-59991?
CVE-2026-59991 is a high-severity denial of service vulnerability in psd-tools, published on 22 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
psd-tools is a Python package for working with Adobe Photoshop PSD files. Prior to 1.17.4, PSDImage.composite() and PSDImage.numpy() allocated output buffers from attacker-controlled PSD header geometry, including width, height, channels, depth, and per-layer rectangles, before validating those values against the available file data. A tiny crafted PSD could therefore cause multi-gigabyte memory allocation, and PSDImage.composite() could return a black image with only a warning instead of raising an exception. Services that composite untrusted PSD files could be terminated by out-of-memory handling. This issue is fixed in version 1.17.4.
Weakness: CWE-789
Which versions are affected by CVE-2026-59991?
3 open source packages ship an affected version, including psd-tools.
| Package | Affected | Fixed in |
|---|---|---|
psd-tools PyPI | All versions | 1.17.4 |
psd-tools PyPI | All versions | 1.17.4 |
psd-tools PyPI | All versions | 1.17.4 |
How do I fix CVE-2026-59991?
Upgrade psd-tools to 1.17.4 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-59991 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59991 exists.
Sources
Also known as DEBIAN-CVE-2026-59991, GHSA-8q6g-vjhf-jp8m, PYSEC-2026-4139, UBUNTU-CVE-2026-59991.