CVE-2026-63501

ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)

Published Nov 3, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
ag-psd is a JavaScript library for reading and writing Photoshop Document files. Prior to 31.0.3, readPsd() accepts a totalMemoryLimit for parsing untrusted PSD files, but decodeLayerImageData expects a differently named memoryLimit property and therefore passes an undefined limit to createImageDataBitDepth. An attacker who can supply a PSD to an application with layer decoding enabled can use attacker-controlled layer dimensions to trigger an allocation larger than the configured limit, causing process memory exhaustion and denial of service. The advisory also identifies inflateSync(compressed) decompressing ZIP-encoded channel data without an output-size cap, which can cause a similar denial of service through unbounded decompression. This vulnerability is fixed in 31.0.1.

Analysis

AI-generated

Technical impact

The vulnerability arises from a mismatch in memory limit handling during PSD layer decoding. When processing untrusted portrait document files, the decoding routine does not honor the configured totalMemoryLimit and instead passes an undefined value, allowing an attacker to specify oversized layer dimensions. This leads to the creation of image data structures that exceed the intended limit, exhausting available process memory and causing the application to crash. Additionally, unbounded decompression of ZIP‑encoded channel data can also trigger denial of service by unlocking unlimited memory usage during inflateSync operations.

Affected Systems

The affected component is the ag-psd JavaScript library, versions prior to 31.0.1. The library is maintained by Agamnentzar and is used in any JavaScript application that reads or writes Photoshop Document files. Applications that enable layer decoding and parse PSD input are at risk when using these older versions.

Risk and Exploitability

The CVSS score of 7.5 indicates a high risk of denial of service. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers can deliver malicious PSD files to any component that uses the library with layer decoding enabled, bypassing the intended memory limit. Exploitation requires only that the library runs as part of the application; no special privileges are needed. The primary impact is process instability and service interruption, which can cascade to broader availability issues for the affected application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ag-psd to version 31.0.1 or later
  • If upgrading is not immediately feasible, disable layer decoding in the application or configure the PSD reader to operate with layer decoding turned off
  • Wrap PSD parsing in a sandboxed or isolated environment and enforce strict memory limits or input validation to prevent excessive allocation

Generated by OpenCVE AI on November 3, 2026 at 21:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6w3r-6hpr-hp6p ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)
History
Type Values Removed Values Added
First Time appeared Agamnentzar
Agamnentzar ag-psd
Vendors & Products Agamnentzar
Agamnentzar ag-psd
Type Values Removed Values Added
Description ag-psd is a JavaScript library for reading and writing Photoshop Document files. Prior to 31.0.3, readPsd() accepts a totalMemoryLimit for parsing untrusted PSD files, but decodeLayerImageData expects a differently named memoryLimit property and therefore passes an undefined limit to createImageDataBitDepth. An attacker who can supply a PSD to an application with layer decoding enabled can use attacker-controlled layer dimensions to trigger an allocation larger than the configured limit, causing process memory exhaustion and denial of service. The advisory also identifies inflateSync(compressed) decompressing ZIP-encoded channel data without an output-size cap, which can cause a similar denial of service through unbounded decompression. This vulnerability is fixed in 31.0.1.
Title ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)
Weaknesses CWE-770
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'}

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 9:32 PM
Reserved
Jul 16, 2026, 9:49 PM
Status
Deferred
Published
Nov 3, 2026, 8:18 PM
Modified
Nov 12, 2026, 10:18 PM