GHSA-qfx6-q44v-9qqw: ag-psd has uncontrolled memory allocation via declared PSD dimensions (DoS)

Published Oct 30, 2026
·
Updated

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.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ag-psd to a version that resolves this vulnerability.

    Fixed in 31.0.0

Event History

Oct 30, 2026
CVE Published
via OSV·08:57 PM
Data Sourced
via OSV·08:57 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are realistically exposed?

Services that call readPsd() on PSD files supplied by untrusted users are exposed. A remote attacker can submit a very small PSD that declares enormous image or layer geometry and cause the process to consume memory.

2

Does exploitation require authentication or user interaction?

No. The supplied severity vector indicates network reachability, low attack complexity, no privileges required, and no user interaction.

3

What happens during exploitation?

ag-psd can allocate multi-gigabyte typed-array buffers based on attacker-declared dimensions before it detects invalid input. The process may be terminated under memory pressure before the later RangeError can be caught, and concurrent malicious inputs can exhaust available memory.

4

Is upgrading to version 31.0.0 sufficient?

Version 31.0.0 adds a limit for composite-image allocations. Complete protection for the separate layer-rectangle allocation path is not established, so its residual exposure requires review.

5

What can be done if patching is not immediately possible?

Do not process untrusted PSD files in the affected service. Where such processing is required, isolate it and enforce resource limits to reduce the impact of excessive memory allocation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203