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.
Published: 2026-10-30
Score: 7.5 High
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

ag-psd is a JavaScript library that reads and writes Photoshop Document files. The vulnerability allows an attacker to declare extraordinarily large PSD geometry that causes the library to allocate several gigabytes of memory before performing bounds checks. This uncontrolled memory allocation can lead to denial of service by exhausting process memory, causing the Node.js runtime to be killed or crash before the error is handled. The weakness is a classic example of CWE-789: Uncontrolled Memory Allocation.

Affected Systems

Agamnentzar’s ag-psd library for JavaScript is affected. Versions prior to 31.0.0 contain the flaw, as the feature that limits composite-image allocation is introduced in 31.0.0 but does not fully cover the layer-rectangle allocation path. Any deployment that loads untrusted PSD files via readPsd() in these older versions is vulnerable.

Risk and Exploitability

With a CVSS score of 7.5, the vulnerability presents a high severity condition, but the EPSS score is not available and the instance is not listed in the CISA KEV catalog. The exploit requires the execution of arbitrary PSD files within the context of an application that invokes readPsd(); a carefully crafted 52‑byte payload can trigger more than 3 GB of peak RSS in Node 24, leading to process termination before the issue is detected. The attack vector is likely a library-facing service or internal script that accepts PSD input, as no network‑direct exposure is mentioned; nevertheless, any environment that processes untrusted documents is at risk. While the remediation in 31.0.0 mitigates composite-image allocations, the layer‑rectangle path remains incomplete, so the risk persists until full coverage is verified.

Generated by OpenCVE AI on October 30, 2026 at 22:22 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the ag‑psd library to version 31.0.0 or later, which introduces a composite‑image allocation limit.
  • If upgrading is not possible, validate or sanitize PSD input dimensions before invoking readPsd(), ensuring declared geometry does not exceed realistic thresholds.
  • Enforce process resource limits (e.g., ulimit, container memory limits) on services that load PSD files to prevent memory exhaustion from affecting the host.

Generated by OpenCVE AI on October 30, 2026 at 22:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 30 Oct 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Agamnentzar
Agamnentzar ag-psd
Vendors & Products Agamnentzar
Agamnentzar ag-psd

Fri, 30 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
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.
Title ag-psd has uncontrolled memory allocation via declared PSD dimensions (DoS)
Weaknesses CWE-789
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Agamnentzar Ag-psd
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-30T20:57:06.379Z

Reserved: 2026-07-13T18:37:08.488Z

Link: CVE-2026-62297

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-30T21:17:13.520

Modified: 2026-10-30T21:17:13.520

Link: CVE-2026-62297

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-30T22:47:52Z

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value