Authorization Bypass Affecting github.com/emicklei/go-restful package, versions <2.16.0
Snyk CVSS
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653
- published 9 May 2022
- disclosed 30 Mar 2022
- credit Unknown
How to fix?
Upgrade github.com/emicklei/go-restful
to version 2.16.0 or higher.
Overview
Affected versions of this package are vulnerable to Authorization Bypass when using CORS
Filter with a configurable AllowedDomains
parameter (which is an array of domains allowed in CORS policy), with the same value as exists in allowedOriginPatterns
parameter (used for matching origin using regular expression), it causes for all domains in AllowedDomains
to be also used as regular expression for matching origin validation.
This behavior means that if example.com
exists in AllowedDomains
, all domains starting with example.com
would be acceptable, including example.com.hacker.domain
.