GO-2022-0619
Authorization bypass in github.com/emicklei/go-restful, go-restful/v2 and go-restful/v3
At a glance
- Published
- Updated
- CVE
- CVE-2022-1996
- Aliases
- GHSA-r48q-9g5r-8q2h
Description
CORS filters that use an AllowedDomains configuration parameter can match domains outside the specified set, permitting an attacker to avoid the CORS policy. The AllowedDomains configuration parameter is documented as a list of allowed origin domains, but values in this list are applied as regular expression matches. For example, an allowed domain of "example.com" will match the Origin header "example.com.malicious.domain".
Affected packages
| Package | Versions |
|---|---|
| Go · github.com/emicklei/go-restful | introduced 0, fixed 2.16.0+incompatible |
| Go · github.com/emicklei/go-restful/v2 | introduced 2.7.1 |
| Go · github.com/emicklei/go-restful/v3 | introduced 3.0.0, fixed 3.8.0 |
References
- https://github.com/emicklei/go-restful/commit/f292efff46ae17e9d104f865a60a39a2ae9402f1 FIX
- https://github.com/emicklei/go-restful/issues/489 WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — Go Vulnerability Database |