Listen to this Post
How the CVE works (approx 20 lines):
The vulnerability resides in ex_webrtc’s DTLS handshake implementation. In WebRTC, mutual authentication relies on comparing the DTLS certificate fingerprint with the value exchanged via SDP (offer/answer). When acting as the DTLS server (passive role), ex_webrtc correctly validates the peer’s fingerprint. However, in the DTLS client (active role) – which is the default when answering a remote offer containing `a=setup:actpass` (the standard browser behavior) – the fingerprint check is skipped. Specifically, on the handshake-completion code path that returns no outgoing packets, the validation routine is never invoked. This means the library does not verify that the certificate presented by the remote DTLS peer matches the fingerprint promised in the SDP. An attacker able to intercept and modify the SDP exchange (e.g., via insecure signalling or compromised signalling server) can substitute their own DTLS certificate fingerprint. The vulnerable DTLS client will accept that certificate without verification, completing the handshake. Consequently, the attacker establishes a DTLS session with the client, while also authenticating separately to the legitimate peer (if that peer performs its own fingerprint check). This breaks the mutual authentication property of WebRTC, reducing security to a one-sided check. All versions prior to 0.15.1 and 0.16.1 are affected, with no backports planned. The bug alone does not enable passive eavesdropping against standards-compliant browsers over TLS signalling, but when chained with insecure signalling or a malicious signalling server, a full man-in-the-middle attack on both SRTP media and SCTP data channels becomes possible.
dailycve form:
Platform: ex_webrtc library
Version: before 0.15.1/0.16.1
Vulnerability: Missing client fingerprint
Severity: Medium
date: 2025-01-15 (publication estimate)
Prediction: Already patched (2024)
Analytics under What Undercode Say:
Check ex_webrtc version in your project grep -E "ex_webrtc.version" mix.exs Simulate missing fingerprint check (conceptual) DTLS client handshake without fingerprint validation openssl s_client -dtls -connect target:443 -verify_return_error Monitor SDP for fingerprint tampering tshark -Y "sdp.fingerprint" -T fields -e sdp.fingerprint
Exploit:
Exploitation requires man-in-the-middle position + SDP rewrite. Attacker intercepts SDP offer, replaces `a=fingerprint:sha-256 legitimate` with own fingerprint. When vulnerable DTLS client (ex_webrtc) connects, it accepts attacker’s certificate without validation. Attacker then forwards media after re-encrypting with legitimate peer.
Protection from this CVE:
Upgrade to ex_webrtc 0.15.1 or 0.16.1. No workarounds exist. For signalling, enforce TLS/WSS and pin signaling server certificates. Implement additional DTLS fingerprint verification at application layer before establishing peer connection.
Impact:
Full man-in-the-middle on audio/video (SRTP) and data channels (SCTP-over-DTLS). Media decryption, injection, or eavesdropping possible when chained with insecure signalling, compromised signalling server, or another vulnerable peer. Browser peers remain safe only due to their own fingerprint validation.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

