CVE-2026-135708 in FFmpeg
Summary
by MITRE • 11/24/2026
FFmpeg 8.0 before 9.1 contains an improper URL scheme validation vulnerability in the WHIP muxer that allows malicious WHIP servers to create or truncate local files via the Location header. Attackers can return a file: URL that dispose_session() opens read-write with truncation on teardown, destroying arbitrary user-writable files or redirecting requests to other protocols.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability identified in FFmpeg versions prior to 9.1 represents a critical security flaw within the WebRTC HTTP Ingest Protocol (WHIP) muxer implementation. This issue stems from an improper validation of URL schemes, specifically concerning how the application handles the Location header returned by remote WHIP servers during session establishment or teardown phases. The core technical failure lies in the lack of strict filtering for non-HTTP(S) URI schemes when processing redirects or location updates provided by external entities. In a typical web security context, applications must rigorously validate that any URL derived from server responses adheres to expected protocols such as HTTP or HTTPS. However, FFmpeg's WHIP muxer fails to enforce this boundary, allowing the ingestion of arbitrary Uniform Resource Identifiers including file system paths and other protocol handlers. This deficiency creates a pathway for remote code execution scenarios involving local resource manipulation rather than direct shell access, but with equally severe consequences regarding data integrity and confidentiality.
The operational impact of this vulnerability is significant because it allows an attacker controlling or spoofing a WHIP server to interact directly with the victim's file system through the application's internal session management functions. Specifically, during the teardown phase of a WebRTC session, FFmpeg invokes a dispose_session routine that processes the final location information provided by the server. If this location contains a file: URL scheme, the muxer opens the specified local path in read-write mode with truncation enabled. This mechanism effectively allows an attacker to overwrite or completely erase any file on the victim's system for which they have write permissions. The ability to truncate files means that critical configuration files, logs, media assets, or other sensitive data can be instantly destroyed without leaving a trace of partial corruption, leading to denial of service conditions and potential loss of important records. Furthermore, by redirecting requests to other protocols such as ftp: or gopher:, an attacker might induce the application to make unintended network connections from the victim's machine, potentially facilitating further reconnaissance or exploitation within internal networks if FFmpeg is running with elevated privileges or in a restricted environment.
This vulnerability aligns closely with CWE-79, which covers Improper Neutralization of Input During Web Page Generation, although it specifically manifests as CWE-829 when considering the inclusion of untrusted functionality via external resources like URLs. More precisely, it falls under CWE-601 URL Redirection to Untrusted Site or Domain and CWE-434 Unsafe Deserialization if one considers the parsing of the URI structure itself as a form of unsafe input handling that leads to unintended side effects. From an ATT&CK perspective, this behavior maps to T1552.007 Unsecured Credentials via Local File Access if the truncated files contain sensitive data, and potentially T1496 Remote System Discovery or T1048 Exfiltration Over Alternative Protocol if other schemes are exploited for data exfiltration channels. The attack vector is classified as remote because it requires only that a victim connects to a malicious WHIP server, making it highly exploitable in environments where video conferencing or live streaming services interact with untrusted third-party infrastructure.
Mitigation strategies must focus on immediate patching and defensive coding practices within the application layer. Users running FFmpeg versions prior to 9.1 should upgrade immediately to version 9.1 or later, as this release addresses the improper URL scheme validation logic in the WHIP muxer. For organizations unable to update immediately due to dependency constraints, implementing a network-level proxy that inspects and sanitizes HTTP headers before they reach FFmpeg can provide temporary relief by blocking file: URLs and other non-HTTP schemes from being processed. Additionally, running FFmpeg with restricted filesystem permissions is advisable; ensuring the application operates under a user account with minimal write privileges limits the scope of files an attacker could truncate or overwrite. Developers integrating FFmpeg into larger applications should also implement strict input validation on any data derived from external server responses before passing it to internal APIs that handle file operations, adhering to the principle of least privilege and defense in depth to prevent similar vulnerabilities across different protocol handlers within the multimedia framework.