A vulnerability in ag-psd versions prior to 31.0.0 allows a crafted PSD file with maliciously declared large dimensions to cause excessive memory allocation. This leads to an out-of-memory condition that can crash the process or exhaust system memory, resulting in a denial-of-service (DoS) condition. The flaw arises because the library allocates memory based on header-declared geometry before validating these values against actual data size. A fix is available in version 31.0.0.