Vulnerabilities in pkg:golang/github.com/emicklei/go-restful
PACKAGECVE-2022-1996 is a CRITICAL (CVSS 9.1) authorization bypass through user-controlled key vulnerability (CWE-639: Authorization Bypass Through User-Controlled Key) affecting Github.com/emicklei/go restful/v3 libraries in the Go ecosystem. The issue involves authorization bypass through user-controlled key in go-restful. Remediation is available by upgrading affected packages to version 3.8.0, 2.16.0.
pkg:golang/github.com/emicklei/go-restful
Vulnerability advisories affecting package pkg:golang/github.com/emicklei/go-restful. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r48q-9g5r-8q2h | CVE-2022-1996 | CRITICAL | Authorization Bypass Through User-Controlled Key in go-restful |
CVE-2022-1996 at a Glance
Security Impact
CVSS: 9.1
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:H/I:H/A:N).
How to Fix CVE-2022-1996
To remediate this vulnerability, upgrade all affected Github.com/emicklei/go restful/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.
Upgrade github.com/emicklei/go-restful/v3 to 3.8.0
Upgrade github.com/emicklei/go-restful to 2.16.0
Upgrade github.com/emicklei/go-restful/v2 to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/emicklei/go-restful/v3
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-1996, inspect your project dependencies for Github.com/emicklei/go restful/v3:
inspect dependencies for github.com/emicklei/go-restful/v3
Analyze the terminal output to locate any version of Github.com/emicklei/go restful/v3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8.0), 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-639: Authorization Bypass Through User-Controlled Key, where the system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. In Github.com/emicklei/go restful/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
CVE-2022-1996 Affected Github.com/emicklei/go restful/v3 Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed 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
|
|
References
Frequently Asked Questions
What is CVE-2022-1996?
Which Github.com/emicklei/go restful/v3 versions are affected?
What version fixes CVE-2022-1996?
Is github.com/emicklei/go-restful/v3 affected?
Is github.com/emicklei/go-restful affected?
What is the CVSS score of CVE-2022-1996?
What CWE is associated with CVE-2022-1996?
How can I check Go dependencies for CVE-2022-1996?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r48q-9g5r-8q2h",
"modified" : "2022-06-17T18:18:04Z",
"published" : "2022-06-09T00:00:23Z",
"aliases" : [ "CVE-2022-1996" ],
"summary" : "Authorization Bypass Through User-Controlled Key in go-restful",
"details" : "Authorization Bypass Through User-Controlled Key in GitHub repository emicklei/go-restful prior to v3.8.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/emicklei/go-restful/v3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.8.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/emicklei/go-restful"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.16.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/emicklei/go-restful/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1996"
}, {
"type" : "WEB",
"url" : "https://github.com/emicklei/go-restful/issues/489"
}, {
"type" : "WEB",
"url" : "https://github.com/emicklei/go-restful/commit/926662532deb450272956c7bc573978464aae74e"
}, {
"type" : "WEB",
"url" : "https://github.com/emicklei/go-restful/commit/f292efff46ae17e9d104f865a60a39a2ae9402f1"
}, {
"type" : "WEB",
"url" : "https://github.com/emicklei/go-restful/commit/fd3c327a379ce08c68ef18765bdc925f5d9bad10"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20220923-0005"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0619"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZY2SLWOQR4ZURQ7UBRZ7JIX6H6F5JHJR"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGQKWD6SE75PFBPFVSZYAKAVXKBZXKWS"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z55VUVGO7E5PJFXIOVAY373NZRHBNCI5"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/W56PP46JVZEKCANBKXFKRVSBBRRMCY6V"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SO5QC2JFW2PXBWAE27OYYYL5SPFUBHTY"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RQXU752ALW53OJAF5MG3WMR5CCZVLWW6"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OBDD3Q23RCGAGHIXUCWBU6N3S4RNAKXB"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/575BLJ3Y2EQBRNTFR2OSQQ6L2W6UCST3"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/be837427-415c-4d8c-808b-62ce20aa84f1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/emicklei/go-restful"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-639" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-09T23:50:21Z",
"nvd_published_at" : "2022-06-08T13:15:00Z"
}
}