CVE-2024-7055
Medium · 6.3CVSS
6.3
EPSS
1.4%
Published
Aug 6, 2024
CISA due date
—
Cloudanix analysis
A flaw in a widely used media handling library can let attackers crash programs or run harmful code by sending a specially made image file.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Tampering
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in pnm_decode_frame within libavcodec/pnmdec.c allows remote attackers to corrupt memory during decoding of crafted PNM image data.
Why it matters to the business
Media processing pipelines and applications relying on FFmpeg may experience crashes, data corruption, or remote code execution, disrupting video workflows and increasing incident response costs.
How an attack unfolds
An attacker crafts a malicious PNM image file that triggers the buffer overflow when processed by the vulnerable pnm_decode_frame function; the file is delivered remotely to any FFmpeg instance performing decoding, potentially leading to arbitrary code execution or denial of service.
How to fix it
Upgrade FFmpeg to version 7.0.2 or later, or apply commit 2ece1f83e41a0f8b88d2d48c5f916a826537cd0c in affected git repositories; rebuild and redeploy dependent applications.
How to confirm the fix worked
Verify installed FFmpeg version is 7.0.2 or newer; test decoding of known-good and edge-case PNM files post-upgrade; review build logs for the referenced commit.
Typical attack path
- Identify target systems accepting or processing PNM images via FFmpeg
- Craft specially malformed PNM file exploiting the heap overflow
- Deliver file over network or via file upload to trigger decoding
- Achieve memory corruption for code execution or service disruption
How to detect it
Review application and system logs for FFmpeg process crashes or segmentation faults during PNM decoding; correlate with file upload or media processing events; inspect for anomalous memory allocations in media pipelines.
What your security team should do
- Prioritize upgrade of all FFmpeg instances to 7.0.2 within 30 days
- Inventory and update downstream applications using FFmpeg
- Implement input validation or sandboxing around media decoding
- Monitor EPSS trend and public exploit availability for increased urgency
The record
A vulnerability was found in FFmpeg up to 7.0.1. It has been classified as critical. This affects the function pnm_decode_frame in the library /libavcodec/pnmdec.c. The manipulation leads to heap-based buffer overflow. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 7.0.2 is able to address this issue. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-273651.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | ffmpeg | 0 | No fix |
| Debian:11 | ffmpeg | 0 | 7:4.3.8-0+deb11u1 |
| Debian:12 | ffmpeg | 0 | 7:5.1.6-0+deb12u1 |
| Debian:13 | ffmpeg | 0 | 7:7.0.2-1 |
| Debian:14 | ffmpeg | 0 | 7:7.0.2-1 |
| Mageia:9 | ffmpeg | 0 | 5.1.6-1.mga9 |
| Mageia:9 | ffmpeg | 0 | 5.1.6-1.mga9.tainted |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | ffmpeg-4 | 0 | 4.4-150600.13.13.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | ffmpeg-4 | 0 | 4.4.5-150600.13.16.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP5 | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | ffmpeg-4 | 0 | 4.4-150600.13.13.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | ffmpeg-4 | 0 | 4.4.5-150600.13.16.1 |
| Ubuntu:22.04:LTS | ffmpeg | 0 | No fix |
| Ubuntu:24.04:LTS | ffmpeg | 0 | No fix |
| Ubuntu:24.10 | ffmpeg | 0 | 7:7.0.2-1ubuntu1 |
| Ubuntu:Pro:14.04:LTS | libav | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | ffmpeg | 0 | 7:4.4.2-0ubuntu0.22.04.1+esm9 |
| Ubuntu:Pro:24.04:LTS | ffmpeg | 0 | 7:6.1.1-3ubuntu5+esm5 |
| openSUSE:Leap 15.5 | ffmpeg-4 | 0 | 4.4-150400.3.42.1 |
| openSUSE:Leap 15.6 | ffmpeg-4 | 0 | 4.4-150600.13.13.1 |
| openSUSE:Leap 15.6 | ffmpeg-4 | 0 | 4.4.5-150600.13.16.1 |
| openSUSE:Tumbleweed | ffmpeg-4 | 0 | 4.4.4-14.1 |
| openSUSE:Tumbleweed | ffmpeg-5 | 0 | 5.1.4-13.1 |
| openSUSE:Tumbleweed | ffmpeg-6 | 0 | 6.1.1-9.1 |
| openSUSE:Tumbleweed | ffmpeg-7 | 0 | 7.1-1.1 |
Related vulnerabilities
- CVE-2025-0518 Unchecked Return Value, Out-of-bounds Read vulnerability in FFmpeg allows Read Sensitive… Also affects ffmpeg
- CVE-2023-6601 A flaw was found in FFmpeg's HLS demuxer. Also affects ffmpeg
- CVE-2023-6604 A flaw was found in FFmpeg. Also affects ffmpeg
- CVE-2023-6605 A flaw was found in FFmpeg's DASH playlist support. Also affects ffmpeg
- CVE-2024-36613 FFmpeg n6.1.1 has a vulnerability in the DXA demuxer of the libavformat library allowing… Also affects ffmpeg
- CVE-2023-6603 A flaw was found in FFmpeg's HLS playlist parsing. Also affects ffmpeg
- CVE-2023-6602 A flaw was found in FFmpeg's TTY Demuxer. Also affects ffmpeg
- CVE-2024-35368 FFmpeg n7.0 is affected by a Double Free via the rkmpp_retrieve_frame function within… Also affects ffmpeg