Critical Array Index Validation Flaw in FFmpeg Package

ffmpeg Updated 03 Oct 2025

Summary

17/04/2024
N/A
Yes i
Critical
9.8

UBUNTU-CVE-2024-31581: FFmpeg version n6.1 was discovered to contain an improper validation of array index vulnerability in libavcodec/cbs_h266_syntax_template.c. Affects ffmpeg versions < 7:7.1.1-1ubuntu1.1. Fixed in 7:7.1.1-1ubuntu1.1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

FFmpeg is a widely-used open-source software suite for handling multimedia data, including audio and video processing. It provides libraries and tools for encoding, decoding, transcoding, muxing, demuxing, streaming, filtering, and playing various multimedia formats. The package is essential for developers and users who require robust multimedia solutions. However, a critical vulnerability has been identified in FFmpeg version n6.1, which could potentially lead to severe consequences if exploited.

Vulnerability Detail

The vulnerability arises from improper validation of array indices in the file libavcodec/cbs_h266_syntax_template.c. This flaw allows attackers to manipulate the application, leading to undefined behavior, which could result in crashes, data corruption, or arbitrary code execution. The vulnerability has a CVSS score of 9.8, indicating its critical nature and the potential for significant impact on affected systems.

How To Fix

Minimum fixed version

7:7.1.1-1ubuntu1.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ffmpeg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the affected features of FFmpeg until the package is updated. However, the best course of action is to apply the patch as soon as possible.

Conclusion

The identified vulnerability in FFmpeg poses a significant risk due to its potential for causing undefined behavior and system compromise. Users are strongly advised to update to the patched version to mitigate these risks. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.

See every vulnerability recorded for ffmpeg →

Share this vulnerability

FAQ

The vulnerability is an improper validation of array index, which can lead to undefined behavior within the application.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Simply upload your manifest file like package-lock.json to check for vulnerabilities.

The CVSS score of this vulnerability is 9.8, indicating a critical level of severity.

Yes, a patch is available in the updated version 7:7.1.1-1ubuntu1.1 of the FFmpeg package.

If immediate updates are not possible, avoid using the affected features of FFmpeg until the patch can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for ffmpeg.

How To Fix

Minimum fixed version

7:7.1.1-1ubuntu1.1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ffmpeg

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback