Overview
The following report discusses a critical vulnerability discovered in rust-ffmpeg 0.3.0. This vulnerability, designated as CVE-2025-57612, allows an attacker to induce a denial of service (DoS) by exploiting a null pointer dereference issue. Entities that rely on this software for multimedia processing are potentially at risk, and the potential for system compromise or data leakage makes this issue highly significant.
Vulnerability Summary
CVE ID: CVE-2025-57612
Severity: High (CVSS:7.5)
Attack Vector: Remote
Privileges Required: None
User Interaction: None
Impact: System compromise, potential data leakage
Affected Products
Product | Affected Versions
rust-ffmpeg | 0.3.0 (after commit 5ac0527)
How the Exploit Works
The vulnerability stems from a null pointer dereference in the `name()` method of rust-ffmpeg 0.3.0. This method fails to handle NULL return values from the `av_get_sample_fmt_name()` C function properly. By providing an unrecognized sample format, an attacker can trigger this vulnerability and cause a DoS condition.
Conceptual Example Code
Below is a conceptual example of how the vulnerability might be exploited using a malformed multimedia file:
use std::process::Command;
use rust_ffmpeg::format::input;
let mut file = input("malformed_file.ff").unwrap();
let stream = file.streams().best_audio().unwrap();
let codec = stream.codec().unwrap();
// Triggering the vulnerability
let name = codec.sample_fmt().name().unwrap();
In the above pseudocode, `malformed_file.ff` is a file with an unrecognized sample format. When processed, it causes the `name()` method to encounter a NULL value, triggering a DoS condition.
