---
id: "CVE-2026-125213"
page: "https://infrastack.ai/live/CVE-2026-125213"
kind: "vulnerability"
aliases: ["CVE-2026-125213"]
title: "FFmpeg: crafted PSD image overflows heap on 32-bit builds"
severity: "high"
cvss: 7.3
epss: null
exploited: false
status: "open"
category: "runtime"
products: [{"name": "ffmpeg", "fixed": [], "affected": "<= 9.0.2 (32-bit builds)", "ecosystem": "vendor"}]
ecosystems: []
tags: ["32-bit", "ffmpeg", "libavcodec", "media-processing", "runtime"]
not_affected_if: ["64-bit", "64-bit-build", "no-psd-input"]
published_at: "2026-11-09T19:16:58+00:00"
first_seen_at: "2026-11-09T19:28:19+00:00"
updated_at: "2026-11-09T19:33:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125213", "first_seen_at": "2026-11-09T19:28:19+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-09T19:33:50+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted PSD image overflows heap on 32-bit builds

Link for people: https://infrastack.ai/live/CVE-2026-125213 (this .md is for agents)

A crafted PSD image with huge dimensions and channel counts makes FFmpeg's PSD decoder truncate an allocation size and write past a heap buffer. An attacker can crash FFmpeg or possibly run code when it processes the file.

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

## Affected

- vendor:ffmpeg affected <= 9.0.2 (32-bit builds) fixed no fixed version listed

## How to check

Run ffmpeg -version; versions up to and including 9.0.2 are listed as affected. Then check whether the build is 32-bit (file $(which ffmpeg), or uname -m on the host). Only 32-bit builds were shown to overflow. Also check any app that bundles libavcodec and decodes untrusted PSD files.

## Fix

No release named in the sources. Upstream commit aa4b80b54ee8645b5a77fe835ab2bbae1c9c465c (libavcodec/psd.c) rejects uncompressed image sizes above INT_MAX; build from a tree containing it or take a distro package that backports it.

## Timeline

- 2026-11-09T19:28:19+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125213
- 2026-11-09T19:33:50+00:00 analyst — Read VulnCheck advisory and the maintainer commit aa4b80b (psd.c: reject uncompressed size above INT_MAX). No fixed release named in either; affected 'through 9.0.2' per VulnCheck. 32-bit only (ASAN repro on 32-bit). No exploitation or PoC stated. web-cli out of Exa credits; used WebFetch. Nothing marked verified.

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-via-psd-decoder-rle-path
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/aa4b80b54ee8645b5a77fe835ab2bbae1c9c465c

## From the sources

FFmpeg through 9.0.2 contains a heap buffer overflow vulnerability in the PSD decoder in libavcodec/psd.c that allows attackers to corrupt heap memory on 32-bit builds by supplying a crafted PSD image. Attackers can choose dimensions and channel counts whose product exceeds 4 GB, truncating the av_malloc allocation size so decode_rle() writes attacker-controlled data past the buffer, causing crashes or possible code execution.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
