Description
FFmpeg through 9.0.2 contains a memory leak vulnerability in mediaformat_jni_setBuffer() in libavcodec/mediacodec_wrapper.c that never frees buffers wrapped with NewDirectByteBuffer(). Attackers can supply crafted media files with large extradata, leaking native memory on each MediaCodec decoder configuration in Android applications and causing resource exhaustion.
Published: 2026-11-09
Score: 2 Low
EPSS: n/a
KEV: No
Impact: Memory Leak leading to Resource Exhaustion
Action: Patch
AI Analysis

Impact

FFmpeg releases up through 9.0.2 suffer a memory leak in the mediaformat_jni_setBuffer() routine found in libavcodec/mediacodec_wrapper.c. The function allocates buffers using NewDirectByteBuffer() but never releases them, allowing the leak to accumulate each time a MediaCodec decoder is configured. This flaw creates a flaw that allows attackers to craft media files with large extradata, thereby consuming native memory indiscriminately and potentially exhausting system resources. The weakness is identified as a CWE-401: Unreleased Resource. The impact is confined to resource exhaustion rather than data theft or execution of arbitrary code.

Affected Systems

Affected systems are Android applications that embed FFmpeg versions 9.0.2 or earlier. The vulnerable code is part of the FFmpeg project itself, and the version list is limited to the release series up to and including 9.0.2. Organizations using FFmpeg 9.0.2 or earlier in any executable that interfaces with MediaCodec on Android are potentially impacted.

Risk and Exploitability

The risk posture is modest. The CVSS score is 2.0, which reflects a low severity primarily due to lack of privilege escalation or direct data compromise. Exploit probability is unknown (EPSS not available) and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. The likely attack vector is via crafted media files; an attacker who can supply such files—whether locally or over a network—can drive the leak, making the vector a file‑based input attack. However, because the vulnerability does not provide a remote code‑execution path, the short‑term risk is limited to gradual resource exhaustion that could affect availability.

Generated by OpenCVE AI on November 9, 2026 at 22:07 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a version of FFmpeg later than 9.0.2 where the memory leak in mediaformat_jni_setBuffer() has been repaired.
  • If an update is not immediately feasible, limit the size of media files processed or sanitize extradata to reduce buffer allocation before calling mediacodec_jni_setBuffer().
  • Implement monitoring of native memory usage and enforce periodic restarts or memory limits on services using FFmpeg to mitigate the impact of an unresolved leak.

Generated by OpenCVE AI on November 9, 2026 at 22:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 09 Nov 2026 19:15:00 +0000

Type Values Removed Values Added
Description FFmpeg through 9.0.2 contains a memory leak vulnerability in mediaformat_jni_setBuffer() in libavcodec/mediacodec_wrapper.c that never frees buffers wrapped with NewDirectByteBuffer(). Attackers can supply crafted media files with large extradata, leaking native memory on each MediaCodec decoder configuration in Android applications and causing resource exhaustion.
Title FFmpeg through 9.0.2 Memory Leak via MediaCodec JNI setBuffer
First Time appeared Ffmpeg
Ffmpeg ffmpeg
Weaknesses CWE-401
CPEs cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*
Vendors & Products Ffmpeg
Ffmpeg ffmpeg
References
Metrics cvssV3_1

{'score': 2.5, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L'}

cvssV4_0

{'score': 2, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-11-09T19:11:18.674Z

Reserved: 2026-11-09T18:15:11.265Z

Link: CVE-2026-125198

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-09T19:16:55.977

Modified: 2026-11-09T19:16:55.977

Link: CVE-2026-125198

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-09T22:45:07Z

Weaknesses
  • CWE-401

    Missing Release of Memory after Effective Lifetime