{"schema_version":"1.7.3","id":"GO-2022-0619","published":"2022-08-15T18:05:29Z","modified":"2026-02-04T02:45:38.113647Z","aliases":["CVE-2022-1996","GHSA-r48q-9g5r-8q2h"],"related":["CGA-hg94-jm75-6758"],"summary":"Authorization bypass in github.com/emicklei/go-restful, go-restful/v2 and go-restful/v3","details":"CORS filters that use an AllowedDomains configuration parameter can match domains outside the specified set, permitting an attacker to avoid the CORS policy.\n\nThe 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":[{"package":{"name":"github.com/emicklei/go-restful","ecosystem":"Go","purl":"pkg:golang/github.com/emicklei/go-restful"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.16.0+incompatible"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/emicklei/go-restful","symbols":["CrossOriginResourceSharing.Filter","CrossOriginResourceSharing.isOriginAllowed"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2022-0619.json"}},{"package":{"name":"github.com/emicklei/go-restful/v2","ecosystem":"Go","purl":"pkg:golang/github.com/emicklei/go-restful/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"2.7.1"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/emicklei/go-restful/v2","symbols":["CrossOriginResourceSharing.Filter","CrossOriginResourceSharing.isOriginAllowed"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2022-0619.json"}},{"package":{"name":"github.com/emicklei/go-restful/v3","ecosystem":"Go","purl":"pkg:golang/github.com/emicklei/go-restful/v3"},"ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.8.0"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/emicklei/go-restful/v3","symbols":["CrossOriginResourceSharing.Filter","CrossOriginResourceSharing.isOriginAllowed"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2022-0619.json"}}],"references":[{"type":"FIX","url":"https://github.com/emicklei/go-restful/commit/f292efff46ae17e9d104f865a60a39a2ae9402f1"},{"type":"WEB","url":"https://github.com/emicklei/go-restful/issues/489"}],"database_specific":{"review_status":"REVIEWED","url":"https://pkg.go.dev/vuln/GO-2022-0619"}}