5.3medium
In github.com/pion/webrtc, failed DTLS certificate verification doesn't stop data channel communication
- Severity
- 5.3medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-74xm-qj29-cq8pGO-2021-0104
Description
Pion WebRTC before 3.0.15 didn't properly tear down the DTLS Connection when certificate verification failed. The PeerConnectionState was set to failed, but a user could ignore that and continue to use the PeerConnection. )A WebRTC implementation shouldn't allow the user to continue if verification has failed.)
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| github.com/pion/webrtc/v3 (Go) | before 3.0.15 | GitHub Advisory Database, Go Vulnerability Database |
| webrtc_project webrtc | before 3.0.15 | NVD |
All scores
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
Pion WebRTC before 3.0.15 didn't properly tear down the DTLS Connection when certificate verification failed. The PeerConnectionState was set to failed, but a user could ignore that and continue to use the PeerConnection. )A WebRTC implementation shouldn't allow the user to continue if verification has failed.)
GitHub Advisory Database
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 team@pion.ly
Thank you to https://github.com/Gaukas for discovering this.
Go Vulnerability Database
Due to improper error handling, DTLS connections were not killed when certificate verification failed, causing users who did not check the connection state to continue to use the connection. This could allow allow an attacker which holds the ICE password, but not a valid certificate, to bypass this restriction.
NVD (es)
Pion WebRTC versiones anteriores a 3.0.15, no eliminó apropiadamente la conexión DTLS cuando falló una comprobación del certificado. El PeerConnectionState se configuró para un fallo, pero un usuario podría ignorarlo y continuar usando PeerConnection. (Una implementación de WebRTC no debería permitir al usuario continuar si la comprobación ha fallado)
References
| https://github.com/pion/webrtc/issues/1708 | exploit, patch, third-party-advisory, web | |
| https://github.com/pion/webrtc/security/advisories/GHSA-74xm-qj29-cq8p | third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-28681 | advisory | |
| https://github.com/pion/webrtc/pull/1709 | fix, web | |
| https://github.com/pion/webrtc/commit/545613dcdeb5dedb01cce94175f40bcbe045df2e | fix, web | |
| https://github.com/pion/webrtc | package | |
| https://pkg.go.dev/vuln/GO-2021-0104 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-28681 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-74xm-qj29-cq8p changed 2026-07-08 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2021-0104 changed 2024-05-20 | CC-BY-4.0 |
| NVD | CVE-2021-28681 changed 2026-06-17 | Public domain |