CVE-2021-22538: Github.com/google/exposure notifications verification server Privilege Escalation Vulnerability
HIGHCVE-2021-22538 is a HIGH (CVSS 8.8) privilege escalation vulnerability (CWE-276: Incorrect Default Permissions) affecting Github.com/google/exposure notifications verification server libraries in the Go ecosystem. The issue involves privilege escalation in rbac. Remediation is available by upgrading affected packages to version 0.23.1.
CVE-2021-22538 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-22538
To remediate this vulnerability, upgrade all affected Github.com/google/exposure notifications verification server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/google/exposure-notifications-verification-server to 0.23.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/google/exposure-notifications-verification-server
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-22538, inspect your project dependencies for Github.com/google/exposure notifications verification server:
inspect dependencies for github.com/google/exposure-notifications-verification-server
Analyze the terminal output to locate any version of Github.com/google/exposure notifications verification server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.1), 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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Github.com/google/exposure notifications verification server, 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
CVE-2021-22538 Affected Github.com/google/exposure notifications verification server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/google/exposure-notifications-verification-server
|
Go |
< 0.23.1
|
0.23.1
|
References
Frequently Asked Questions
What is CVE-2021-22538?
Which Github.com/google/exposure notifications verification server versions are affected?
What version fixes CVE-2021-22538?
Is github.com/google/exposure-notifications-verification-server affected?
What is the CVSS score of CVE-2021-22538?
What CWE is associated with CVE-2021-22538?
How can I check Go dependencies for CVE-2021-22538?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5v95-v8c8-3rh6",
"modified" : "2021-05-20T22:26:21Z",
"published" : "2021-05-21T14:32:55Z",
"aliases" : [ "CVE-2021-22538" ],
"summary" : "Privilege escalation in rbac",
"details" : "### Impact\nUsing a carefully crafted request or malicious proxy, a user with `UserWrite` permissions could create another user with higher privileges than their own due to insufficient checks on the allowed set of permissions. The event would be captured in the Event Log.\n\n### Patches\nThe issue has been fixed in 0.24.0 and 0.23.1.\n\n### Workarounds\nFor users who are unable to upgrade, we recommend auditing users who have `UserWrite` permissions and regularly reviewing the Event Log for malicious activity.\n\n### Kudos\nThank you to Michael Mazzolini (Ethical Hacker at WHO) for finding and disclosing this vulnerability.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/google/exposure-notifications-verification-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.23.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 0.23.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/google/exposure-notifications-verification-server/security/advisories/GHSA-5v95-v8c8-3rh6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22538"
}, {
"type" : "WEB",
"url" : "https://github.com/google/exposure-notifications-verification-server/commit/eb8cf40b12dbe79304f1133c06fb73419383cd95"
}, {
"type" : "WEB",
"url" : "https://github.com/google/exposure-notifications-verification-server/releases/tag/v0.23.1"
}, {
"type" : "WEB",
"url" : "https://github.com/google/exposure-notifications-verification-server/releases/tag/v0.24.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-276" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-20T22:26:21Z",
"nvd_published_at" : "2021-03-31T21:15:00Z"
}
}