CVE-2026-125198
FFmpeg through 9.0.2 contains a memory leak vulnerability in mediaformat_jni_setBuffer() in libavcodec/mediacodec_wrapper.c that never frees buffers wrapped wi…
Impact
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.
An attacker can exploit this with local access to the system, without logging in, but a user has to be involved, for example by viewing content. Specific conditions have to be met, which makes an attack harder. If it succeeds: low risk of outages.
Affected products · FFmpeg
| Product | Affected versions |
|---|---|
| FFmpeg | through 9.0.2 Version 0 ≤9.0.2 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22550
- https://github.com/FFmpeg/FFmpeg/commit/e5d295b3cd467fc713300e208ba2dacc7ff603a0
- https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/mediacodec_wrapper.c#L1134
- https://github.com/FFmpeg/FFmpeg
- https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-memory-leak-via-mediacodec-jni-setbuffer
- https://github.com/advisories/GHSA-4q2x-vx5w-h3m6
- https://nvd.nist.gov/vuln/detail/CVE-2026-125198