Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttain on-path network position
-
DeliveryObserve SCTP INIT/INIT-ACK on PlainTransport
-
ExploitCraft COOKIE-ECHO using hardcoded magic values
-
InstallSet localVerificationTag equal to packet verification tag
-
C2Forged cookie passes all validation checks
-
ExecuteEstablish unauthorized SCTP association
-
ImpactInject DataChannel messages as trusted peer
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Data authenticity verification
|
| Exploitation Conditions | Exploitation requires the attacker to hold an active on-path (network man-in-the-middle) position enabling interception and injection of UDP packets between the victim and the mediasoup worker. The target transport must be a PlainTransport or PipeTransport with SCTP enabled (sctpParameters configured in the transport options) and without SRTP/DTLS protection - specifically, PlainTransport where srtpCryptoSuite is not configured or SRTP is explicitly disabled. WebRtcTransport is explicitly not vulnerable because its SCTP stack operates inside DTLS, which provides the cryptographic integrity that the SCTP layer lacks. PipeTransport is used for internal SFU federation and is typically not internet-exposed, reducing risk for that path. No API-level authentication or credentials against the mediasoup application are required. Exploitation is limited to the SCTP handshake window and requires the ability to inject crafted SCTP packets at the network layer. |
| Impact | The NVD CVSS 3.1 score of 5.6 (AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L) is an accurate representation of this vulnerability's real-world priority. AC:H correctly captures the on-path network position requirement - passive observers cannot exploit this flaw. No EPSS data is available in the provided intelligence. KEV status is negative, meaning no confirmed active exploitation by CISA. No POC code has been publicly identified at time of analysis. The moderate C:L/I:L/A:L triple reflects that a successful attacker gains DataChannel message injection capability as a trusted peer, which could enable session disruption or malicious data injection into conferencing pipelines but does not directly yield full system compromise. The practical attack surface is narrow: PlainTransport without SRTP is typically used for server-side SFU federation (PipeTransport) or internal media routing rather than direct internet-client connections, limiting mass exploitation risk. WebRtcTransport - the standard path for browser clients - is explicitly immune. This is a real vulnerability warranting prompt patching for affected deployments, but not a critical-priority emergency for organizations not using unprotected PlainTransport or PipeTransport with SCTP. |
| Exploit ScenarioDerived | An attacker with on-path access (e.g., via ARP spoofing on a shared LAN, a compromised network device, or BGP hijack in a datacenter interconnect) between a client and a mediasoup PlainTransport endpoint observes an SCTP handshake, then crafts a COOKIE-ECHO chunk using the publicly known magic values 'msworker' and 0xAD81 and sets the localVerificationTag inside the cookie equal to the SCTP packet header's verification tag field - both values are under attacker control. The forged cookie passes StateCookie::IsMediasoupStateCookie() and the HandleReceivedCookieEchoChunk() verification tag check, establishing a rogue SCTP association from which the attacker injects DataChannel messages that mediasoup treats as originating from a legitimate peer. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
SCTP state cookie forgery in mediasoup (npm 3.20.0-3.20.5, Rust crate 0.22.0-0.22.4) permits an on-path attacker to establish unauthorized SCTP associations and inject DataChannel messages as a trusted peer, violating RFC 9260 Section 5.1.3. The root cause is that cookie validation relies entirely on two hardcoded magic constants ('msworker' and 0xAD81) rather than a per-instance HMAC secret - all remaining cookie fields are attacker-controlled, and COOKIE-ECHO packets bypass verification-tag and CRC32c checks by design. No public exploit has been identified at time of analysis; real-world risk is bounded by the narrow attack surface: only PlainTransport and PipeTransport with SCTP enabled and without DTLS/SRTP are vulnerable, while the far more common WebRtcTransport path is explicitly unaffected.
RemediationAI
Upgrade the mediasoup npm package to version 3.20.6 or the Rust crate to version 0.22.5, both confirmed fixed by the vendor in the GHSA advisory (https://github.com/versatica/mediasoup/security/advisories/GHSA-p7x2-g5cq-fhmq) and implemented via PR #1829 (https://github.com/versatica/mediasoup/pull/1829). If immediate upgrade is not possible, enable SRTP on PlainTransport by configuring the srtpCryptoSuite option, which wraps SCTP inside DTLS and eliminates the attack surface at the cost of a slight DTLS handshake latency overhead. Alternatively, disable SCTP entirely on PlainTransport and PipeTransport if DataChannel functionality is not in use - this breaks any DataChannel-based data flows but removes the vulnerable code path entirely. As a network-layer compensating control, restrict PlainTransport and PipeTransport endpoints to trusted internal network segments via firewall rules or VPC security groups, preventing on-path interception from untrusted networks; note this does not fix the underlying flaw and should not substitute for patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo, npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
mediasoup (cpe:2.3:a:versatica:mediasoup) is a WebRTC Selective Forwarding Unit library implemented in C++ (worker) with npm and Rust bindings. Its built-in SCTP stack was introduced in v3.20.0. CWE-345 (Insufficient Verification of Data Authenticity) characterizes the root cause: RFC 9260 Section 5.1.3 mandates that an SCTP endpoint use a one-time-use secret key to protect State Cookies, but mediasoup's StateCookie.hpp/StateCookie.cpp validates cookies solely by checking a fixed 44-byte length, the hardcoded 8-byte prefix 'msworker' at offset 0, and the hardcoded 16-bit constant 0xAD81 in the NegotiatedCapabilitiesField. All remaining fields - localVerificationTag, remoteVerificationTag, TSN/window fields, and tieTag - are fully attacker-controlled. Compounding this, Association::ValidateReceivedPacket() explicitly skips verification-tag validation for COOKIE-ECHO packets, and CRC32c checksum validation (Packet::ValidateCRC32cChecksum()) is never invoked in the reception path, so any crafted packet with any checksum is accepted. The fix introduced in PR #1829 adds a 32-byte per-association random secret (stateCookieSecret), HMAC-SHA1 over the full cookie including a creation timestamp for freshness, and a 60-second ValidCookieLifeMs staleness window, bringing the implementation into RFC 9260 compliance.
Know when Mediasoup gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
On-path network position required (AC:H); no mediasoup API credentials needed (PR:N); impact limited to DataChannel injection without full system compromise (C:L/I:L/A:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
mediasoup is a WebRTC video conferencing system. From version 3.20.0 until 3.20.6 for the npm package and from 0.22.0 until 0.22.5 for the Rust crate, mediasoup's built-in SCTP stack authenticates state cookies using only the hardcoded msworker and 0xAD81 magic values instead of a per-instance secret and HMAC, contrary to RFC 9260 Section 5.1.3. The cookie structure and validation in worker/include/RTC/SCTP/association/StateCookie.hpp and worker/src/RTC/SCTP/association/StateCookie.cpp allow an on-path attacker targeting PlainTransport or PipeTransport with SCTP enabled and without DTLS protection to forge a COOKIE-ECHO whose packet verification tag matches the attacker-controlled localVerificationTag. The forged cookie passes StateCookie::IsMediasoupStateCookie() and Association::HandleReceivedCookieEchoChunk(), establishes an unauthorized SCTP association, and permits DataChannel message injection as a trusted peer. WebRtcTransport is not affected because its SCTP runs inside DTLS. This issue is fixed in npm version 3.20.6 and Rust crate version 0.22.5.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
EUVD-2026-65694
GHSA-p7x2-g5cq-fhmq
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB