CVE-2021-28681: Github.com/pion/webrtc/v3 Security Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-74xm-qj29-cq8p
CVSS 5.3
CWE-863
Published
Advisory Summary

CVE-2021-28681 is a MODERATE (CVSS 5.3) security vulnerability vulnerability (CWE-863: Incorrect Authorization) affecting Github.com/pion/webrtc/v3 libraries in the Go ecosystem. The issue involves in github.com/pion/webrtc, failed dtls certificate verification doesn't stop data channel communication. Remediation is available by upgrading affected packages to version 3.0.15.

CVE-2021-28681 at a Glance

CVE Identifier CVE-2021-28681
GHSA Identifier GHSA-74xm-qj29-cq8p
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-863: Incorrect Authorization
Affected Product Github.com/pion/webrtc/v3
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-28681

To remediate this vulnerability, upgrade all affected Github.com/pion/webrtc/v3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/pion/webrtc/v3 fixed: 3.0.15
Upgrade github.com/pion/webrtc/v3 to 3.0.15
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/pion/webrtc/v3

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-28681, inspect your project dependencies for Github.com/pion/webrtc/v3:

inspect dependencies for github.com/pion/webrtc/v3

Analyze the terminal output to locate any version of Github.com/pion/webrtc/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.15), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Github.com/pion/webrtc/v3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](mailto:team@pion.ly) Thank you to https://github.com/Gaukas for discovering this.

CVE-2021-28681 Affected Github.com/pion/webrtc/v3 Versions

1 component(s)
Fixed Versions:
3.0.15
Product / Package Ecosystem Affected Versions Fixed Version
github.com/pion/webrtc/v3
Go
< 3.0.15
3.0.15

References

Frequently Asked Questions

What is CVE-2021-28681?
CVE-2021-28681 is a security vulnerability in Github.com/pion/webrtc/v3 involving In github.com/pion/webrtc, failed DTLS certificate verification doesn't stop data channel communication under CWE-863: Incorrect Authorization.
Which Github.com/pion/webrtc/v3 versions are affected?
Affected versions include releases prior to 3.0.15 across affected packages: github.com/pion/webrtc/v3.
What version fixes CVE-2021-28681?
Upgrading to 3.0.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/pion/webrtc/v3 affected?
Yes, github.com/pion/webrtc/v3 is affected in releases prior to 3.0.15. Upgrade your dependency to 3.0.15 or later.
What is the CVSS score of CVE-2021-28681?
CVE-2021-28681 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2021-28681?
CVE-2021-28681 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Go dependencies for CVE-2021-28681?
Run the dependency tree command: 'inspect dependencies for github.com/pion/webrtc/v3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-74xm-qj29-cq8p",
  "modified" : "2024-05-20T19:56:37Z",
  "published" : "2021-05-25T18:42:42Z",
  "aliases" : [ "CVE-2021-28681" ],
  "summary" : "In github.com/pion/webrtc, failed DTLS certificate verification doesn't stop data channel communication",
  "details" : "### Impact\nData channel communication was incorrectly allowed with users who have failed DTLS certificate verification.\n\nThis attack requires \n* Attacker knows the ICE password. \n* Only take place during PeerConnection handshake.\n\nThis attack can be detected by monitoring `PeerConnectionState` in all versions of Pion WebRTC.\n\n### Patches\nUsers should upgrade to v3.0.15. \n\nThe exact patch is https://github.com/pion/webrtc/commit/545613dcdeb5dedb01cce94175f40bcbe045df2e\n\n### Workarounds\nUsers should listen for when `PeerConnectionState` changes to `PeerConnectionStateFailed`. When it enters this state users should not continue using the PeerConnection.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/pion/webrtc\n* Email us at [team@pion.ly](mailto:team@pion.ly)\n\nThank you to https://github.com/Gaukas for discovering this.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/pion/webrtc/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pion/webrtc/security/advisories/GHSA-74xm-qj29-cq8p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-28681"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pion/webrtc/issues/1708"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pion/webrtc/pull/1709"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pion/webrtc/commit/545613dcdeb5dedb01cce94175f40bcbe045df2e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pion/webrtc"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2021-0104"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T21:29:41Z",
    "nvd_published_at" : null
  }
}