CVE-2022-1996:
Authorization Bypass Through User-Controlled Key in go-restful
9.1
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
6/9/2022
Updated
3/1/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/emicklei/go-restful/v3 | go | >= 3.0.0, < 3.8.0 | 3.8.0 |
github.com/emicklei/go-restful | go | < 2.16.0 | 2.16.0 |
github.com/emicklei/go-restful/v2 | go | <= 2.7.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper origin validation in CORS handling. The isOriginAllowed function previously used regex patterns compiled by compileRegexps from AllowedDomains, allowing partial matches. The patched commit (fd3c327) replaces regex matching with exact string comparisons and removes compileRegexps, confirming these functions' role in the vulnerability. The CWE-639 description and commit message both indicate the root cause was insecure domain matching logic.