CVE-2021-38171
Ffmpeg vulnerability analysis and mitigation

Overview

CVE-2021-38171 is a vulnerability discovered in FFmpeg 4.4, specifically in the adts_decode_extradata function within libavformat/adtsenc.c. The vulnerability was disclosed on August 21, 2021, and affects the FFmpeg multimedia framework. The issue stems from the function not checking the init_get_bits return value, which is critical because the second argument to init_get_bits can be crafted (NVD, FFmpeg Patch).

Technical details

The vulnerability has been assigned a CVSS v3.1 Base Score of 9.8 (Critical) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The issue is classified as CWE-252 (Unchecked Return Value). The technical flaw lies in the adts_decode_extradata function's failure to validate the return value from init_get_bits, where the second argument (buf) can be manipulated (NVD).

Impact

The vulnerability could potentially lead to denial of service or the execution of arbitrary code if malformed files or streams are processed. Given the CVSS score of 9.8, the impact is considered critical with potential high impacts on confidentiality, integrity, and availability (Debian Security).

Mitigation and workarounds

A fix has been released through a patch that implements proper return value checking for init_get_bits and replaces it with init_get_bits8. Various Linux distributions have released security updates: Debian has fixed the issue in version 7:4.1.8-0+deb10u1 for buster and 7:4.3.3-0+deb11u1 for bullseye, Ubuntu has provided fixes for multiple versions, and Gentoo has addressed it in versions >= 4.4.3 and >= 6.0 (Debian Security, Ubuntu Security, Gentoo Security).

Additional resources


SourceThis report was generated using AI

Related Ffmpeg vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-59734HIGH8.7
  • FfmpegFfmpeg
  • ffmpeg
NoYesOct 06, 2025
CVE-2025-59733HIGH8.7
  • FfmpegFfmpeg
  • ffmpeg
NoYesOct 06, 2025
CVE-2025-63757HIGH7.5
  • FfmpegFfmpeg
  • ffmpeg
NoYesDec 18, 2025
CVE-2025-7700MEDIUM5.3
  • FfmpegFfmpeg
  • libavcodec57-32bit
NoYesNov 07, 2025
CVE-2025-12343N/AN/A
  • FfmpegFfmpeg
  • ffmpeg
NoYesOct 28, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management