{"id":"CVE-2026-62297","kind":"vulnerability","aliases":["CVE-2026-62297"],"related":[],"title":"ag-psd: crafted tiny PSD file forces multi-gigabyte memory allocation","description":"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.","summary":"ag-psd is a JavaScript library for reading and writing Photoshop files. A tiny malicious PSD declaring huge dimensions makes readPsd() allocate multi-gigabyte buffers before failing, so an attacker can crash or exhaust memory on a service that reads untrusted PSDs.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["image-processing","javascript","node","package","self-hosted"],"not_affected_if":["auth-required","no-untrusted-psd-input"],"how_to_check":"- Check the installed version with `npm ls ag-psd` and compare against the fixed release.\n- Search your code for calls to `readPsd()` that accept files uploaded or supplied by users.","fix":"- ag-psd `31.0.0` adds a composite-image allocation limit; the sources say complete coverage of the layer-rectangle allocation path is not established, so verify before relying on it.","status":"open","published_at":"2026-10-30T21:17:13+00:00","first_seen_at":"2026-10-30T21:25:53+00:00","triaged_at":"2026-10-30T21:26:44+00:00","updated_at":"2026-10-30T21:26:44+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-30T21:26:44Z","model":"claude-haiku-5-5","output":{"fix":"- ag-psd `31.0.0` adds a composite-image allocation limit; the sources say complete coverage of the layer-rectangle allocation path is not established, so verify before relying on it.","reach":"internet","title":"ag-psd: crafted tiny PSD file forces multi-gigabyte memory allocation","impact":"medium","summary":"ag-psd is a JavaScript library for reading and writing Photoshop files. A tiny malicious PSD declaring huge dimensions makes readPsd() allocate multi-gigabyte buffers before failing, so an attacker can crash or exhaust memory on a service that reads untrusted PSDs.","audience":"developers","category":"package","nicknames":[],"who_cares":["node","javascript","image-processing","self-hosted"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Attacker crashes the service or exhausts server memory with a tiny file","analyst_note":"Confirm whether ag-psd 31.0.0 fully covers the layer-rectangle allocation path (curator residual/scope review noted in the NVD description).","how_to_check":"- Check the installed version with `npm ls ag-psd` and compare against the fixed release.\n- Search your code for calls to `readPsd()` that accept files uploaded or supplied by users.","plain_action":"","needs_analyst":true,"not_affected_if":["no-untrusted-psd-input","auth-required"],"who_is_affected":"Applications that pass untrusted or user-uploaded PSD files to readPsd() are exposed, because the allocation happens before validation. Systems that only read PSD files they generate or fully control can skip it. The sources say the layer-rectangle allocation path may not be fully covered even in 31.0.0.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000759,"input_tokens":4396,"output_tokens":638,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':15A,18A '-62297':16A,19A '24':167C '3.17':170C '31.0.0':96C,224C '52':162C 'actual':115C 'add':225C 'ag':2A,30B,74C 'ag-psd':1A,29B,73C 'alloc':13A,51B,90C,120C,154C,230C,242C 'allocation-limit':89C 'approxim':169C 'array':130C 'attack':60B,105C 'attacker-declar':104C 'attempt':93C 'avail':116C 'bound':158C 'buffer':55B,102C 'byte':163C 'caught':190C 'channel':134C 'commit':98C 'complet':233C 'composit':228C 'composite-imag':227C 'concurr':192C 'content':222C 'coverag':234C 'craft':4A 'crash':62B 'curat':249C 'cve':14A,17A 'data':117C 'declar':46B,106C,112C,145C 'demand':216C 'denial':204C 'depth':135C 'describ':238C 'differ':208C 'dimens':48B 'document':85C 'enorm':146C 'error':159C,187C 'establish':246C 'exhaust':64B,195C 'expos':202C 'fail':57B 'file':7A,41B,86C,213C 'forc':8A,149C 'gb':171C 'genuin':210C 'geometri':108C,147C 'gigabyt':11A,54B,152C 'heap':128C 'height':133C 'host':28B 'huge':47B 'imag':21B,99C,229C 'image-process':20B 'implement':124C 'input':164C,193C,221C 'javascript':23B,34B,78C 'larg':211C 'later':157C 'layer':101C,139C,240C 'layer-rectangl':239C 'librari':35B,79C 'limit':91C,121C,231C 'make':49B 'malici':44B 'memori':12A,65B,153C,178C,196C,215C 'multi':10A,53B,151C 'multi-gigabyt':9A,52B,150C 'node':24B,166C 'off-heap':126C 'packag':25B 'path':243C 'peak':172C 'per':138C 'per-lay':137C 'photoshop':40B,84C 'pressur':179C 'process':22B,181C 'produc':168C 'proport':218C 'psd':3A,6A,31B,45B,75C,107C,144C,212C 'psdreader.js':123C 'psds':72B,200C 'rangeerror':176C 'read':37B,70B,81C,198C 'readpsd':50B,97C 'real':220C 'rectangl':140C,241C 'remedi':92C 'report':161C 'requir':248C 'residual/scope':250C 'review':251C 'rss':173C 'sane':119C 'self':27B 'self-host':26B 'separ':237C 'servic':68B,197C,206C 'size':125C 'termin':184C 'tini':5A,43B,143C 'type':129C 'untrust':71B,199C 'use':131C 'valid':110C 'version':95C,223C 'whose':214C 'width':132C 'write':39B,83C","nicknames":[],"mitigations":[],"who_affected":"Applications that pass untrusted or user-uploaded PSD files to readPsd() are exposed, because the allocation happens before validation. Systems that only read PSD files they generate or fully control can skip it. The sources say the layer-rectangle allocation path may not be fully covered even in 31.0.0.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T21:17:13+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-62297","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62297","severity":null,"published_at":"2026-10-30T21:17:13+00:00","modified_at":"2026-10-30T21:17:13+00:00","first_seen_at":"2026-10-30T21:25:53+00:00","fetched_at":"2026-10-30T21:25:53+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}