Agamnentzar ag-psd
ag-psd: Uncontrolled Memory Allocation in PSD Layer Decoding (totalMemoryLimit bypass)
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 31.0.1
Fixed in 31.0.1
Mitigation
Upgrade ag-psd to 31.0.1 or later.
References
- Vendor advisory github.com/Agamnentzar/ag-psd/security/advisor…
- Patch github.com/Agamnentzar/ag-psd/commit/57ea7d865…
- Release notes github.com/Agamnentzar/ag-psd/releases/tag/31.…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.