CVE-2021-28681 is a medium-severity (CVSS 5.3) CWE-863 vulnerability in github.com/pion/webrtc/v3. 1 public exploit reference exists, so weaponization risk is real. A fix is available for github.com/pion/webrtc/v3 — see the affected versions and patch details below.
In github.com/pion/webrtc, failed DTLS certificate verification doesn't stop data channel communication
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-28681 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/pion/webrtc/v3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Data channel communication was incorrectly allowed with users who have failed DTLS certificate verification.
This attack requires
- Attacker knows the ICE password.
- Only take place during PeerConnection handshake.
This attack can be detected by monitoring PeerConnectionState in all versions of Pion WebRTC.
Patches
Users should upgrade to v3.0.15.
The exact patch is https://github.com/pion/webrtc/commit/545613dcdeb5dedb01cce94175f40bcbe045df2e
Workarounds
Users should listen for when PeerConnectionState changes to PeerConnectionStateFailed. When it enters this state users should not continue using the PeerConnection.
For more information
If you have any questions or comments about this advisory:
- Open an issue in https://github.com/pion/webrtc
- Email us at [email protected]
Thank you to https://github.com/Gaukas for discovering this.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/pion/webrtc/v3 | all versions | 3.0.15go get github.com/pion/webrtc/v3@v3.0.15 |
Affected Products
webrtcwebrtc_projectResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/pion/webrtc/v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/pion/webrtc/v3 to 3.0.15 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-28681 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2021-28681 in your dependencies?
Find it across Go, including transitive dependencies.