CVE-2021-28681
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
github.com/pion/webrtc/v3 (Go)before 3.0.15GitHub Advisory Database, Go Vulnerability Database
webrtc_project webrtcbefore 3.0.15NVD

All scores

GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.0medium CVSS:2.0AV: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:

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

Sources

SourceRecordLicence
CVE ListCVE-2021-28681 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-74xm-qj29-cq8p changed 2026-07-08CC-BY-4.0
Go Vulnerability DatabaseGO-2021-0104 changed 2024-05-20CC-BY-4.0
NVDCVE-2021-28681 changed 2026-06-17Public domain