Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-107660 Overview
CVE-2026-107660 is an improper certificate validation vulnerability [CWE-297] in FFmpeg's mbedTLS-backed TLS implementation. The flaw resides in tls_open() within libavformat/tls_mbedtls.c, which skips hostname verification when the connection target is an IP-literal address. A network attacker positioned between the client and server can present any certificate issued by a trusted certificate authority (CA) and intercept https, rtmps, or tls streams that target IP-literal URLs. The attacker can both read and tamper with the data stream. FFmpeg versions before 8.1.3 and 9.x versions before 9.0.2 are affected.
Critical Impact
Attackers with network position can perform man-in-the-middle attacks against FFmpeg TLS connections to IP-literal URLs, breaking confidentiality and integrity of media streams.
Affected Products
- FFmpeg versions prior to 8.1.3
- FFmpeg 9.x versions prior to 9.0.2
- Applications linking FFmpeg's libavformat compiled with the mbedTLS backend
Discovery Timeline
- 2026-10-08 - CVE-2026-107660 published to NVD
- 2026-10-14 - Last updated in NVD database
Technical Details for CVE-2026-107660
Vulnerability Analysis
FFmpeg's tls_mbedtls.c wraps the mbedTLS library to provide TLS transport for protocols such as HTTPS, RTMPS, and raw TLS. During connection setup, tls_open() configures the TLS session and performs peer certificate validation. For hostnames, mbedTLS verifies the certificate's Subject Alternative Name (SAN) or Common Name (CN) matches. However, when the destination is specified as an IP literal, the code path skips the hostname check entirely rather than enforcing IP SAN matching.
The result is that any certificate chained to a trusted root CA will be accepted for an IP-literal destination, regardless of whether that certificate was issued for the target IP address. A network attacker can intercept the connection and present any valid CA-issued certificate, defeating the authentication guarantee that TLS is designed to provide.
Root Cause
The root cause is a missing identity binding between the TLS peer certificate and the IP address requested by the caller. Proper handling requires validating the IP address against the certificate's iPAddress SAN entries. The affected code omits this check for IP hosts, treating certificate chain validity as sufficient. See the FFmpeg source at tls_mbedtls.c lines 676-681 for the pre-patch logic.
Attack Vector
Exploitation requires an attacker in a privileged network position, such as a compromised router, rogue Wi-Fi access point, or ISP-level interception. The attacker intercepts an FFmpeg client's TLS handshake toward an IP-literal URL (for example, https://203.0.113.10/stream.m3u8 or rtmps://198.51.100.5/live). The attacker then presents a certificate obtained for an unrelated domain from any public CA. Because FFmpeg skips hostname/IP validation for IP hosts, the handshake completes and the attacker can decrypt, modify, or inject stream content.
The vulnerability does not affect connections made to hostnames, since those paths continue to perform SAN/CN verification. See the VulnCheck advisory for FFmpeg for additional context.
Detection Methods for CVE-2026-107660
Indicators of Compromise
- Unexpected TLS certificates presented for IP-literal destinations where the certificate's SAN does not include the target IP address.
- FFmpeg process network connections to IP-literal URLs over https, rtmps, or tls schemes in environments where hostnames are standard.
- Media stream integrity anomalies, such as unexpected content substitution or truncation on IP-addressed sources.
Detection Strategies
- Inventory FFmpeg binaries and libraries across the environment and compare versions against the fixed releases 8.1.3 and 9.0.2.
- Inspect application configurations and command-line invocations for use of IP-literal URLs with TLS-protected schemes.
- Capture TLS metadata at network egress points and alert when FFmpeg user agents negotiate TLS to IP destinations with certificates whose SAN lacks the matching iPAddress entry.
Monitoring Recommendations
- Monitor process execution telemetry for ffmpeg command lines containing IP-literal URLs with https://, rtmps://, or tls:// prefixes.
- Correlate FFmpeg network flows with TLS inspection logs to identify certificate/hostname mismatches on IP destinations.
- Track package manager and container image builds to detect installations of vulnerable FFmpeg versions.
How to Mitigate CVE-2026-107660
Immediate Actions Required
- Upgrade FFmpeg to version 8.1.3 or 9.0.2 or later across all systems, containers, and build pipelines.
- Audit applications that embed libavformat to confirm the linked FFmpeg version includes the fix.
- Rebuild and redeploy downstream software and container images that statically link or bundle FFmpeg.
Patch Information
The FFmpeg project addressed the issue in commits 0cd2a70, 57a2e70, and d377212, tracked in FFmpeg Pull Request #24383. The patches enforce certificate identity validation against the IP address when the destination is an IP literal. Fixed versions are 8.1.3 and 9.0.2.
Workarounds
- Avoid passing IP-literal URLs to FFmpeg for https, rtmps, or tls connections; use fully qualified hostnames so SAN/CN verification runs.
- Build FFmpeg against an alternative TLS backend (such as OpenSSL or GnuTLS) that performs IP SAN validation, until mbedTLS-backed builds can be upgraded.
- Restrict outbound FFmpeg traffic to known, trusted media origins through egress firewall rules to reduce exposure to on-path attackers.
# Verify installed FFmpeg version against the fixed releases
ffmpeg -version | head -n1
# Example: refuse IP-literal TLS targets in a wrapper script until patched
case "$1" in
https://[0-9]*|rtmps://[0-9]*|tls://[0-9]*)
echo "IP-literal TLS targets blocked pending FFmpeg >= 8.1.3 / 9.0.2" >&2
exit 1 ;;
esac
exec /usr/bin/ffmpeg "$@"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

