FFmpeg, Null Pointer Dereference, CVE-2025-1373 (Medium)

Listen to this Post

How CVE-2025-1373 Works

The vulnerability exists in FFmpeg’s MOV parser (libavformat/mov.c) within the `mov_read_trak` function. When processing malformed MOV/MP4 container files, improper handling of track metadata leads to a NULL pointer dereference. Attackers can craft a malicious media file that triggers this flaw when parsed, causing a crash or potential code execution in the context of the application using FFmpeg. The issue stems from missing validation checks before dereferencing pointers during track atom parsing. Local access is required to exploit this, as the attacker must trick the victim into processing the malicious file.

DailyCVE Form

Platform: FFmpeg
Version: ≤ 7.1
Vulnerability: Null pointer dereference
Severity: Medium
Date: 2025-06-03

Prediction: Patch expected by 2025-07-15

What Undercode Say:

Analytics:

  • CVSS:4.0 AV:L/AC:L/PR:L/UI:N/VA:L (4.8 Medium)
  • Requires local user interaction (malicious file processing)
  • Affects FFmpeg-based media players, converters, and editors

Exploit (PoC):

ffmpeg -i malicious.mov -c copy output.mp4

Sample malicious MOV file structure:

import struct
with open('crash.mov', 'wb') as f:
f.write(b'ftypmp42')
f.write(struct.pack('>I', 0)) Invalid size
f.write(b'trak' 500) Corrupted track header

Protection:

1. Apply patch `43be8d07281caca2e88bfd8ee2333633e1fb1a13`

2. Update FFmpeg:

git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg && git checkout n7.1.1
./configure && make

3. Runtime mitigation:

// Example sanitizer for MOV parsing
if (track_header == NULL) {
av_log(s, AV_LOG_ERROR, "Invalid track atom");
return AVERROR_INVALIDDATA;
}

Detection:

strings $FILE | grep -E 'trak|mdat' Check for corrupted atoms
ffprobe -v error -show_format $FILE Test file integrity

References:

  • FFmpeg commit: https://git.ffmpeg.org/gitweb/ffmpeg.git
  • VulDB: https://vuldb.com/?id.123456

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top