rust-ffmpeg Use-After-Free Vulnerability in write_interleaved Method Allows Denial-of-Service or Memory Corruption

Vulnerability

A use-after-free vulnerability has been identified in rust-ffmpeg version 0.3.0 (after commit 5ac0527). The issue arises in the write_interleaved method, which improperly manages data through mutable and immutable references, violating Rust's aliasing rules. This mismanagement can lead to undefined behavior, allowing an attacker to cause memory corruption or a denial-of-service condition.

Impact

Exploitation of this vulnerability causes undefined behavior, with potential consequences including use-after-free errors, memory corruption, or logic errors if the affected data is accessed after the fact.

Reproduction

The vulnerability can be reproduced by calling the write_interleaved method with a packet reference. The method will modify the packet data while only holding an immutable reference, leading to a use-after-free condition. This can be demonstrated by creating a packet, passing it to write_interleaved, and then accessing the packet data afterward, which will reflect the unintended modifications.

Remediation

No specific remediation is available, but users are advised to avoid using the unmaintained rust-ffmpeg crate.

Added: Sep 2, 2025, 4:38 PM
Updated: Sep 2, 2025, 4:38 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.7
remediation
0.0
relevance
0.5
threat
6.4
urgency
2.9
incentive
5.8

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.