---
id: "CVE-2026-63501"
kind: "vulnerability"
aliases: ["CVE-2026-63501"]
title: "ag-psd: crafted Photoshop files exhaust memory and crash parsing"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["image-processing", "javascript", "npm", "package", "psd"]
not_affected_if: ["no-layer-decoding", "trusted-input-only"]
published_at: "2026-11-03T20:18:17+00:00"
first_seen_at: "2026-11-03T20:49:23+00:00"
updated_at: "2026-11-03T20:50:12+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63501", "first_seen_at": "2026-11-03T20:49:23+00:00"}]
---

# ag-psd: crafted Photoshop files exhaust memory and crash parsing

ag-psd is a JavaScript library that reads and writes Photoshop PSD files. A crafted PSD with oversized layer dimensions or compressed data can make the parser allocate more memory than the configured limit, which exhausts process memory and causes denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed version with `npm ls ag-psd`
- Search for `readPsd(` calls in code that handles untrusted PSD uploads
- Check whether layer decoding is enabled in those calls

## Fix

- Upgrade ag-psd to `31.0.3` or later (the description says it is fixed in 31.0.1, and the prior-to bound is 31.0.3)

## Timeline

- 2026-11-03T20:49:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-63501

## Documents

- [advisory] Vendor advisory: github.com https://github.com/Agamnentzar/ag-psd/security/advisories/GHSA-6w3r-6hpr-hp6p
- [fix] Patch: github.com https://github.com/Agamnentzar/ag-psd/commit/57ea7d865238b6b7c8a2e976bcf2a77e03116e2f
- [fix] Release notes: github.com https://github.com/Agamnentzar/ag-psd/releases/tag/31.0.3

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
