npm
CVE-2026-62297
ag-psd can exhaust memory when parsing crafted PSD dimensions
- Severity
- High 7.5
- Published
- 13 Nov 2026
- Last changed
- 13 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 31.0.0
- Exploit chance
- 0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-789
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Also known as
- GHSA-qfx6-q44v-9qqw
- Sources
- OSV.dev and GitHub
Description
readPsd() commits the image/layer buffers from the declared header geometry (width x height x channels x depth, and per-layer rectangles) before validating those values against the actual data. A tiny crafted PSD declaring huge geometry forces a multi-gigabyte allocation.
On ag-psd 30.2.0, Node 24, a 52-byte PSD makes readPsd(buf) commit ~3.17 GB (measured peak RSS) in ~0.45 s before throwing a catchable RangeError ("Offset is outside the bounds of the DataView") — about 61,000,000x amplification. Because the buffer is committed before validation, the allocation OOM-kills the process before the error on essentially any host (uncatchable), and concurrent requests exhaust memory. Any service reading untrusted PSDs with ag-psd is exposed to a remote DoS.
This is distinct from #39 and #206, which involve genuinely large PSDs (memory proportional to real data). Here the input is 52 bytes: the file declares enormous geometry that is never present, so the allocation is driven by an…
Affected software
| Software | Affected versions |
|---|---|
ag-psdnpm · osv:npm:ag-psd |
|
About ag-psd
- Weekly downloads (npm)
- 653,757npm, 24 Nov 2026
Vulnerabilities in ag-psd
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-63501ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)High 7.5 9 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-62297
- GitHub Advisory Database https://github.com/advisories/GHSA-qfx6-q44v-9qqw