CVE-2021-30080: Github.com/beego/beego/v2 Access Control Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-28r6-jm5h-mrgg
Published
Advisory Summary

CVE-2021-30080 is a HIGH access control bypass vulnerability (General Security Weakness) affecting Github.com/beego/beego/v2 libraries in the Go ecosystem. The issue involves access control bypass in beego. Remediation is available by upgrading affected packages to version 2.0.3.

CVE-2021-30080 at a Glance

CVE Identifier CVE-2021-30080
GHSA Identifier GHSA-28r6-jm5h-mrgg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/beego/beego/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2021-30080

To remediate this vulnerability, upgrade all affected Github.com/beego/beego/v2 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/beego/beego/v2 fixed: 2.0.3
Upgrade github.com/beego/beego/v2 to 2.0.3
github.com/beego/beego fixed: Latest secure release
Upgrade github.com/beego/beego to Latest secure release
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/beego/beego/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-30080, inspect your project dependencies for Github.com/beego/beego/v2:

inspect dependencies for github.com/beego/beego/v2

Analyze the terminal output to locate any version of Github.com/beego/beego/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), 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 General Security Weakness. In Github.com/beego/beego/v2, 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

An issue was discovered in the route lookup process in beego through 2.0.1, allows attackers to bypass access control.

CVE-2021-30080 Affected Github.com/beego/beego/v2 Versions

2 component(s)
Fixed Versions:
2.0.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/beego/beego/v2
Go
≥ 2.0.0
< 2.0.3
2.0.3
github.com/beego/beego
Go
≤ 1.12.11

References

Frequently Asked Questions

What is CVE-2021-30080?
CVE-2021-30080 is a security vulnerability in Github.com/beego/beego/v2 involving Access control bypass in Beego under General Security Weakness.
Which Github.com/beego/beego/v2 versions are affected?
Affected versions include releases prior to 2.0.3 across affected packages: github.com/beego/beego/v2, github.com/beego/beego.
What version fixes CVE-2021-30080?
Upgrading to 2.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/beego/beego/v2 affected?
Yes, github.com/beego/beego/v2 is affected in releases prior to 2.0.3. Upgrade your dependency to 2.0.3 or later.
Is github.com/beego/beego affected?
Yes, github.com/beego/beego is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2021-30080?
CVE-2021-30080 is classified under General Security Weakness.
How can I check Go dependencies for CVE-2021-30080?
Run the dependency tree command: 'inspect dependencies for github.com/beego/beego/v2'. 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-28r6-jm5h-mrgg",
  "modified" : "2022-04-07T18:13:46Z",
  "published" : "2022-04-06T00:01:30Z",
  "aliases" : [ "CVE-2021-30080" ],
  "summary" : "Access control bypass in Beego",
  "details" : "An issue was discovered in the route lookup process in beego through 2.0.1, allows attackers to bypass access control.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/beego/beego/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/beego/beego"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.12.11"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-30080"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/beego/beego/pull/4459"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/beego/beego/commit/d5df5e470d0a8ed291930ae802fd7e6b95226519"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/beego/beego"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0572"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-04-07T18:13:46Z",
    "nvd_published_at" : "2022-04-05T16:15:00Z"
  }
}