CVE-2023-51794
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Apr 26, 2024
CISA due date
—
Cloudanix analysis
A flaw in a popular media-processing tool can let someone who already has access to the computer run their own programs if they feed it a specially made video or audio file.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in libavfilter/af_stereowiden.c:120 allows an attacker-supplied value to overwrite adjacent stack memory, enabling arbitrary code execution in the context of the FFmpeg process.
Why it matters to the business
Systems that process untrusted media files with FFmpeg can be fully compromised by an attacker who already has the ability to run code or supply files locally, leading to loss of confidentiality, integrity, and availability on media-processing hosts.
How an attack unfolds
An attacker supplies a specially crafted audio or video file that exercises the stereowiden filter; the malformed parameter triggers an out-of-bounds write that overwrites return addresses or function pointers, allowing shellcode execution when the filter processes the frame.
How to fix it
Upgrade FFmpeg to a version containing the fix for the stereowiden buffer overflow; rebuild any locally compiled installations or containers with the patched source; disable the stereowiden filter via AVOptions where upgrade is not immediately possible.
How to confirm the fix worked
Confirm the installed FFmpeg version is newer than the vulnerable commit; run regression tests that exercise af_stereowiden with boundary values; monitor for crashes or sanitizer violations when processing crafted test files.
Typical attack path
- Obtain local execution or file-write access on a host running FFmpeg
- Place or stream a malicious media file that invokes the stereowiden filter
- Trigger FFmpeg to decode or filter the file (via command line, library call, or application)
- Exploit the resulting buffer overflow to gain arbitrary code execution
How to detect it
Search process execution logs and command-line audit trails for invocations of FFmpeg that include the stereowiden filter; inspect core dumps or sanitizer reports for stack-smashing indicators near af_stereowiden; correlate with file-creation events of media files immediately preceding abnormal FFmpeg termination.
What your security team should do
- Prioritize patching FFmpeg on any internet-facing or multi-tenant media-processing systems
- Restrict local execution of FFmpeg to trusted users and inputs only
- Add FFmpeg version checks to software bill-of-materials and container scanning pipelines
- Review applications that invoke FFmpeg with user-supplied filters for additional hardening
The record
Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to execute arbitrary code via the libavfilter/af_stereowiden.c:120:69.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | ffmpeg-6 | 0 | 0 |
| Chainguard | ffmpeg-6-dev | 0 | 0 |
| Chainguard | ffmpeg-6-doc | 0 | 0 |
| Chainguard | ffmpeg-6-libavcodec61 | 0 | 0 |
| Chainguard | ffmpeg-6-libavdevice61 | 0 | 0 |
| Chainguard | ffmpeg-6-libavfilter10 | 0 | 0 |
| Chainguard | ffmpeg-6-libavformat61 | 0 | 0 |
| Chainguard | ffmpeg-6-libavutil59 | 0 | 0 |
| Chainguard | ffmpeg-6-libpostproc58 | 0 | 0 |
| Chainguard | ffmpeg-6-libswresample5 | 0 | 0 |
| Chainguard | ffmpeg-6-libswscale8 | 0 | 0 |
| Chainguard | ffmpeg-6-qt-faststart | 0 | 0 |
| Chainguard | ffmpeg-6-static | 0 | 0 |
| Chainguard | ffmpeg-7 | 0 | 7.1.3-r2 |
| Chainguard | ffmpeg-7.1 | 0 | 7.1.3-r1 |
| Chainguard | ffmpeg-8.0 | 0 | 8.0.1-r2 |
| Debian:11 | ffmpeg | 0 | 7:4.3.7-0+deb11u1 |
| Debian:12 | ffmpeg | 0 | 7:5.1.5-0+deb12u1 |
| Debian:13 | ffmpeg | 0 | 7:7.0.1-3 |
| Mageia:9 | ffmpeg | 0 | 5.1.5-1.mga9 |
| Mageia:9 | ffmpeg | 0 | 5.1.5-1.mga9.tainted |
| SUSE:Enterprise Storage 7.1 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP5 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Module for Desktop Applications 15 SP6 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | ffmpeg-4 | 0 | 4.4-150600.13.5.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 SP2-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP5 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP5 | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | ffmpeg-4 | 0 | 4.4-150600.13.5.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | ffmpeg-4 | 0 | 4.4.5-150600.13.16.1 |
| Ubuntu:20.04:LTS | ffmpeg | 0 | No fix |
| Ubuntu:22.04:LTS | ffmpeg | 0 | No fix |
| Ubuntu:23.10 | ffmpeg | 0 | 7:6.0-6ubuntu1.1 |
| Ubuntu:Pro:16.04:LTS | ffmpeg | 0 | 7:2.8.17-0ubuntu0.1+esm7 |
| Ubuntu:Pro:18.04:LTS | ffmpeg | 0 | 7:3.4.11-0ubuntu0.1+esm5 |
| Ubuntu:Pro:20.04:LTS | ffmpeg | 0 | 7:4.2.7-0ubuntu0.1+esm5 |
| Ubuntu:Pro:22.04:LTS | ffmpeg | 0 | 7:4.4.2-0ubuntu0.22.04.1+esm4 |
| Ubuntu:Pro:24.04:LTS | ffmpeg | 0 | 7:6.1.1-3ubuntu5+esm1 |
| Wolfi | ffmpeg-7 | 0 | 7.1.3-r2 |
| Wolfi | ffmpeg-7.1 | 0 | 7.1.3-r1 |
| Wolfi | ffmpeg-8.0 | 0 | 8.0.1-r2 |
| openSUSE:Leap 15.5 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| openSUSE:Leap 15.5 | ffmpeg-4 | 0 | 4.4-150400.3.32.1 |
| openSUSE:Leap 15.6 | ffmpeg | 0 | 3.4.2-150200.11.47.1 |
| openSUSE:Leap 15.6 | ffmpeg-4 | 0 | 4.4-150600.13.5.1 |
| openSUSE:Leap 15.6 | ffmpeg-4 | 0 | 4.4.5-150600.13.16.1 |
| openSUSE:Tumbleweed | ffmpeg-4 | 0 | 4.4.4-9.1 |
| openSUSE:Tumbleweed | ffmpeg-5 | 0 | 5.1.4-8.1 |
| openSUSE:Tumbleweed | ffmpeg-7 | 0 | 7.1.1-1.1 |
Related vulnerabilities
- CVE-2025-0518 Unchecked Return Value, Out-of-bounds Read vulnerability in FFmpeg allows Read Sensitive… Also affects ffmpeg-6
- CVE-2023-51793 Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-51796 Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-51798 Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-51791 Buffer Overflow vulenrability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-51795 Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-50010 Buffer Overflow vulnerability in Ffmpeg v.n6.1-3-g466799d4f5 allows a local attacker to… Also affects ffmpeg-6
- CVE-2023-50009 Buffer Overflow vulnerability in Ffmpeg v.n6.1-3-g466799d4f5 allows a local attacker to… Also affects ffmpeg-6