npm
CVE-2026-63501
ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)
- Severity
- High 7.5
- Published
- 9 Nov 2026
- Last changed
- 9 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 31.0.1
- Exploit chance
- 0.5% in the next 30 daysHigher than 44% of CVEs. EPSS by FIRST, 24 Nov 2026
- 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-6w3r-6hpr-hp6p
- Sources
- OSV.dev and GitHub
Description
The readPsd() function in ag-psd accepts a totalMemoryLimit option to cap memory usage when parsing untrusted PSD files, but this limit is never forwarded to the layer image buffer allocation path. A property name mismatch (totalMemoryLimit vs. memoryLimit) causes the size guard inside createImageDataBitDepth to be skipped unconditionally. An attacker who can supply a crafted PSD to any application using ag-psd for server-side parsing can force an unbounded heap allocation — a 5000×5000 layer in a 86-byte file allocates 200 MB — leading to denial of service through process memory exhaustion regardless of what limit the caller specified.
readPsd() (exported from src/index.ts:22) wraps caller-supplied bytes in a PsdReader object that inherits ReadOptions, which defines totalMemoryLimit?: number (src/psd.ts:1819). A default of 2 GB is written into the reader at src/psdReader.ts:237.
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-62297ag-psd can exhaust memory when parsing crafted PSD dimensionsHigh 7.5 13 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-63501
- GitHub Advisory Database https://github.com/advisories/GHSA-6w3r-6hpr-hp6p