ag-psd has uncontrolled memory allocation via declared PSD dimensions (DoS)
Affects ag-psd 30.2.0 and earlier in services that pass untrusted PSD files to readPsd. Fixed in 31.0.0.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 31.0.0
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
ag-psd, a JavaScript library for reading and writing Photoshop (PSD) files, is affected, along with any application that uses it to parse untrusted PSD files. A specially crafted tiny file that declares huge image dimensions can make the library allocate multiple gigabytes of memory, which can crash the process or exhaust memory across concurrent requests, causing a denial of service.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
ag-psd is a JavaScript library for reading and writing Photoshop Document files. Before the allocation-limit remediation attempt in version 31.0.0, `readPsd()` commits image and layer buffers from attacker-declared PSD geometry before validating the declarations against the actual available data or sane allocation limits. The `psdReader.js` implementation sizes off-heap typed arrays using `width`, `height`, `channels`, `depth` and `per-layer rectangles`, so a tiny PSD declaring enormous geometry can force multi-gigabyte memory allocation before a later bounds error. The reported 52-byte input on Node 24 produced approximately 3.17 GB peak RSS before a RangeError; under memory pressure the process can be terminated before the error can be caught, and concurrent inputs can exhaust memory. Services reading untrusted PSDs are exposed to denial of service. This differs from genuinely large PSD files whose memory demand is proportional to real input content. Version 31.0.0 adds a composite-image allocation limit, but complete coverage of the separately described layer-rectangle allocation path is not established and requires curator residual/scope review.
Timeline
- CVE published
- First seen by cve.now
Affected versions
- Agamnentzar ag-psd
fixed in 31.0.0
References 3
GitHub · Agamnentzar/ag-psd
Questions about CVE-2026-62297
What does this mean?
A tiny crafted PSD file makes the library allocate multi-gigabyte memory before it validates the file, which can crash the process or exhaust memory under concurrent requests.Source: github.com
Am I affected, and how do I check?
The advisory's affected range is ag-psd 30.2.0 or earlier, and the crash was reproduced on Node 24. To check a version, look at the installed ag-psd version in package.json or the lockfile, and check whether the application passes untrusted PSD files to readPsd.Source: github.com
What should I do about it?
Upgrade ag-psd to 31.0.0 or later, the fixed version listed for this product.Source: github.com
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data