p PatchFirst

CVE-2026-66040

CVE-2026-66040 · FFmpeg Heap Out-of-Bounds Write via PNG/APNG eXIf Encoder

This page contains facts from public vulnerability sources. Check the original advisory before updating.

FFmpeg through 8.1.2, fixed in commit b506faf, contains a heap out-of-bounds write vulnerability in the native PNG and APNG encoders that allows remote attackers to corrupt heap memory by supplying a crafted PNG image with a malicious eXIf chunk. Attackers can craft an eXIf chunk where multiple IFD entries reference the same large value payload, causing canonical serialization to expand the output far beyond the undersized allocation estimated by add_exif_profile_size(), resulting in png_write_chunk() writing tens of thousands of bytes past the buffer boundary, leading to deterministic heap corruption, process crash, and potentially arbitrary code execution.

CVSS 8.7 · High · EPSS 0.8% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • ffmpeg

    Versions
    • ≥ 0, ≤ 8.1.2: Affected (semver)
    • b506fafec9a19fcbc2be5271875fd4a63d6615bc: Not affected (git)

    No fix published

  • ffmpeg Debian:12

    Versions
    • 7:5.1.3-1
    • 7:5.1.3-2
    • 7:5.1.4-0+deb12u1
    • 7:5.1.5-0+deb12u1
    • 7:5.1.6-0+deb12u1
    • 7:5.1.7-0+deb12u1
    • 7:5.1.8-0+deb12u1
    • 7:5.1.9-0+deb12u1
    • 7:6.0-1
    • 7:6.0-2
    • 7:6.0-3
    • 7:6.0-4
    • 7:6.0-5
    • 7:6.0-6
    • 7:6.0-7
    • 7:6.0-8
    • 7:6.0-9
    • 7:6.1-1
    • 7:6.1-2
    • 7:6.1-3
    • 7:6.1-4
    • 7:6.1-5
    • 7:6.1.1-1
    • 7:6.1.1-2
    • 7:6.1.1-3
    • 7:6.1.1-4
    • 7:6.1.1-5
    • 7:7.0-1
    • 7:7.0.1-1
    • 7:7.0.1-2
    • 7:7.0.1-3
    • 7:7.0.1-4
    • 7:7.0.1-5
    • 7:7.0.2-1
    • 7:7.0.2-2
    • 7:7.0.2-3
    • 7:7.1-1
    • 7:7.1-2
    • 7:7.1-3
    • 7:7.1-4
    • 7:7.1.1-1
    • 7:7.1.2-1
    • 7:7.1.3-1
    • 7:8.0-1
    • 7:8.0-2
    • 7:8.0.1-1
    • 7:8.0.1-2
    • 7:8.0.1-3
    • 7:8.1-1
    • 7:8.1-2
    • 7:8.1-3
    • 7:8.1.1-1
    • 7:8.1.1-2
    • 7:8.1.1-3
    • 7:8.1.1-4
    • 7:8.1.2-1
    • 7:8.1.2-2
    • 7:9.0-1
    • 7:9.0.1-1
    • 7:9.0.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ffmpeg Debian:13

    Versions
    • 7:7.1.1-1
    • 7:7.1.2-0+deb13u1
    • 7:7.1.2-1
    • 7:7.1.3-0+deb13u1
    • 7:7.1.3-1
    • 7:7.1.4-0+deb13u1
    • 7:7.1.5-0+deb13u1
    • 7:8.0-1
    • 7:8.0-2
    • 7:8.0.1-1
    • 7:8.0.1-2
    • 7:8.0.1-3
    • 7:8.1-1
    • 7:8.1-2
    • 7:8.1-3
    • 7:8.1.1-1
    • 7:8.1.1-2
    • 7:8.1.1-3
    • 7:8.1.1-4
    • 7:8.1.2-1
    • 7:8.1.2-2
    • 7:9.0-1
    • 7:9.0.1-1
    • 7:9.0.2-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ffmpeg Debian:14

    Versions
    • 7:7.1.1-1
    • 7:7.1.2-1
    • 7:7.1.3-1
    • 7:8.0-1
    • 7:8.0-2
    • 7:8.0.1-1
    • 7:8.0.1-2
    • 7:8.0.1-3
    • 7:8.1-1
    • 7:8.1-2
    • 7:8.1-3
    • 7:8.1.1-1
    • 7:8.1.1-2
    • 7:8.1.1-3
    • 7:8.1.1-4
    • 7:8.1.2-1
    • 7:8.1.2-2
    • 7:9.0-1
    • 7:9.0.1-1
    Affected ranges
    • ECOSYSTEM: < 7:9.0.2-1

    Update to 7:9.0.2-1

  • libav Ubuntu:Pro:14.04:LTS

    Versions
    • 6:0.8.7-1ubuntu2
    • 6:9.10-1ubuntu1
    • 6:9.10-1ubuntu2
    • 6:9.10-1ubuntu5
    • 6:9.10-1ubuntu6
    • 6:9.10-1ubuntu7
    • 6:9.11-2ubuntu1
    • 6:9.11-2ubuntu2
    • 6:9.13-0ubuntu0.14.04.1
    • 6:9.14-0ubuntu0.14.04.1
    • 6:9.16-0ubuntu0.14.04.1
    • 6:9.18-0ubuntu0.14.04.1
    • 6:9.20-0ubuntu0.14.04.1
    • 6:9.20-0ubuntu0.14.04.1+esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • ffmpeg Ubuntu:26.10

    Versions
    • 7:8.0.1-3ubuntu2
    • 7:8.1-3ubuntu3
    • 7:8.1.2-2ubuntu2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →