CVE-2025-47807
Executive Summary
CVE-2025-47807 is a NULL pointer dereference vulnerability in the GStreamer multimedia framework, specifically within the subparse plugin's subrip_unescape_formatting function. This flaw can be triggered when parsing a specially crafted SubRip (SRT) subtitle file, leading to a denial of service (crash) of the GStreamer application. The vulnerability affects GStreamer versions up to and including 1.26.1. No public proof-of-concept or patch is currently available.
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
CVSS Breakdown & Threat Level
The CVSS score is listed as 0.0, indicating that a full vector has not been assigned by NVD. However, based on the vulnerability type (NULL pointer dereference) and attack vector (local file parsing), a reasonable assessment would be:
- Attack Vector (AV): Local (L) – requires the attacker to provide a malicious subtitle file.
- Attack Complexity (AC): Low (L) – no special conditions required.
- Privileges Required (PR): None (N) – no authentication needed.
- User Interaction (UI): Required (R) – user must open the malicious file.
- Scope (S): Unchanged (U) – only the vulnerable component is affected.
- Confidentiality (C): None (N) – no data exposure.
- Integrity (I): None (N) – no data modification.
- Availability (A): High (H) – application crash leads to denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Estimated Base Score: 5.5 (Medium)
Threat Level: Medium. The vulnerability requires user interaction and local file access, limiting its exploitability in remote scenarios. However, it can be used in phishing campaigns or bundled with media files to crash media players or processing pipelines.
Deep Dive & Mechanics
The vulnerability resides in the subrip_unescape_formatting function within the subparse plugin of GStreamer. This function is responsible for parsing SubRip (SRT) subtitle files and handling formatting tags (e.g., <b>, <i>, <u>). The flaw occurs when the function encounters a malformed or unexpected formatting tag sequence that causes it to dereference a NULL pointer.
Root Cause Analysis:
The function likely processes formatting tags by iterating through the subtitle text and looking for opening and closing tags. If a tag is opened but not properly closed, or if the tag content is empty, the internal state machine may attempt to access a pointer that has not been initialized or has been set to NULL. This leads to a segmentation fault and application crash.
Triggering Condition:
An attacker can craft an SRT file containing a subtitle entry with a malformed formatting tag, such as:
- An unclosed tag:
<b>text - An empty tag:
<b></b> - A tag with invalid characters:
<b>text<
When GStreamer processes this file, the subrip_unescape_formatting function will attempt to dereference a NULL pointer, causing a crash.
Vulnerable vs. Patched Code
Since no official patch is available, the vulnerable code path can be described as follows:
Vulnerable Code (Conceptual):
// In subrip_unescape_formatting function
char* subrip_unescape_formatting(const char* input) {
char* output = g_malloc(strlen(input) + 1);
char* out_ptr = output;
const char* in_ptr = input;
while (*in_ptr) {
if (*in_ptr == '<') {
// Assume it's a formatting tag
const char* tag_start = in_ptr + 1;
const char* tag_end = strchr(tag_start, '>');
if (tag_end) {
// Process tag
// VULNERABLE: If tag_start == tag_end (empty tag),
// or if tag content is malformed, a pointer may be NULL
process_tag(tag_start, tag_end);
in_ptr = tag_end + 1;
} else {
// Unclosed tag - potential NULL dereference
// VULNERABLE: No check for NULL before dereference
process_tag(tag_start, NULL); // NULL dereference
break;
}
} else {
*out_ptr++ = *in_ptr++;
}
}
*out_ptr = '\0';
return output;
}
Patched Code (Hypothetical):
// In subrip_unescape_formatting function
char* subrip_unescape_formatting(const char* input) {
char* output = g_malloc(strlen(input) + 1);
char* out_ptr = output;
const char* in_ptr = input;
while (*in_ptr) {
if (*in_ptr == '<') {
const char* tag_start = in_ptr + 1;
const char* tag_end = strchr(tag_start, '>');
if (tag_end && tag_end > tag_start) {
// Valid tag found
process_tag(tag_start, tag_end);
in_ptr = tag_end + 1;
} else {
// Invalid or unclosed tag - skip or handle gracefully
*out_ptr++ = *in_ptr++;
}
} else {
*out_ptr++ = *in_ptr++;
}
}
*out_ptr = '\0';
return output;
}
Exploitation & Lab Setup
Red Team
Objective: Crash a GStreamer-based application by providing a malicious SRT subtitle file.
Lab Setup:
- Install GStreamer 1.26.1 on a test system.
- Create a malicious SRT file (
malicious.srt) with the following content:
1
00:00:01,000 --> 00:00:05,000
Hello <b>world
2
00:00:06,000 --> 00:00:10,000
This is a test <i>subtitle
- Use a GStreamer pipeline to play the file:
gst-launch-1.0 filesrc location=malicious.srt ! subparse ! fakesink
- Observe the crash (segmentation fault).
Expected Outcome: The GStreamer process crashes due to NULL pointer dereference.
Blue Team
Detection:
- Monitor for crashes in GStreamer processes (e.g.,
gst-launch-1.0, media players). - Look for SRT files with malformed formatting tags in logs or file system.
- Use file integrity monitoring to detect creation of suspicious SRT files.
Mitigation:
- Validate SRT files before processing (e.g., using a sanitizer).
- Run GStreamer in a sandboxed environment to limit impact of crashes.
- Apply input validation to reject files with unclosed or empty formatting tags.
Indicators of Compromise (IOCs)
- File Hashes (MD5):
d41d8cd98f00b204e9800998ecf8427e(example – actual hash depends on file content) - File Names:
malicious.srt,exploit.srt,crash.srt - Process Names:
gst-launch-1.0,totem,vlc(if using GStreamer backend) - Log Entries: Segmentation fault in
subrip_unescape_formattingfunction - Network Traffic: None (local file parsing)
Detection Engineering
YARA Rule
rule CVE_2025_47807_GStreamer_Subparse_NULL_Deref {
meta:
description = "Detects malicious SRT files exploiting CVE-2025-47807"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-47807"
strings:
$s1 = /<[bius]>\s*$/ nocase
$s2 = /<[bius]>[^<]*$/ nocase
$s3 = /<[bius]><\/[bius]>/ nocase
condition:
any of ($s1, $s2, $s3)
}
Sigma Rule
title: GStreamer Subparse NULL Pointer Dereference (CVE-2025-47807)
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects crashes in GStreamer subparse plugin due to malformed SRT files
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/gst-launch-1.0'
CommandLine|contains: 'subparse'
condition: selection
falsepositives:
- Legitimate subtitle files with complex formatting
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-47807 GStreamer Subparse NULL Dereference"; flow:to_server,established; content:"|3c 62 3e|"; nocase; content:"|3c 2f 62 3e|"; distance:0; within:100; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Upgrade GStreamer: Monitor for official patches from the GStreamer project and upgrade to a fixed version when available.
- Input Validation: Implement strict validation of SRT files before processing, rejecting files with unclosed or empty formatting tags.
- Sandboxing: Run GStreamer-based applications in a sandboxed environment to limit the impact of crashes.
- User Awareness: Educate users about the risks of opening subtitle files from untrusted sources.
- Workaround: If patching is not possible, disable the
subparseplugin or use an alternative subtitle parser.
Valters IT