{"id":"CVE-2020-5233","aliases":["BIT-oauth2-proxy-2020-5233","GHSA-qqxw-m5fj-f7gv"],"url":"https://o3.security/vulnerability/CVE-2020-5233","summary":"The pattern '/\\domain.com' is not disallowed when redirecting, allowing for open redirect","details":"### Impact\nAn open redirect vulnerability has been found in `oauth2_proxy`. Anyone who uses `oauth2_proxy` may potentially be impacted. \n\nFor a context [detectify] have an in depth blog post about the potential impact of an open redirect. Particularly see the OAuth section.\n\n**tl;dr**: People's authentication tokens could be silently harvested by an attacker. e.g:\n`facebook.com/oauth.php?clientid=123&state=abc&redirect_url=https://yourdomain.com/red.php?url%3dhttps://attacker.com/`\n\n### Patches\n\n@sauyon found the issue, and has submitted a patch. \n\n```\ndiff --git a/oauthproxy.go b/oauthproxy.go\nindex 72ab580..f420df6 100644\n--- a/oauthproxy.go\n+++ b/oauthproxy.go\n@@ -517,7 +517,7 @@ func (p *OAuthProxy) GetRedirect(req *http.Request) (redirect string, err error)\n // IsValidRedirect checks whether the redirect URL is whitelisted\n func (p *OAuthProxy) IsValidRedirect(redirect string) bool {\n \tswitch {\n-\tcase strings.HasPrefix(redirect, \"/\") && !strings.HasPrefix(redirect, \"//\"):\n+\tcase strings.HasPrefix(redirect, \"/\") && !strings.HasPrefix(redirect, \"//\") && !strings.HasPrefix(redirect, \"/\\\\\"):\n \t\treturn true\n \tcase strings.HasPrefix(redirect, \"http://\") || strings.HasPrefix(redirect, \"https://\"):\n \t\tredirectURL, err := url.Parse(redirect)\n```\n\nThis patch will be applied to the next release, which is scheduled for when this is publicly disclosed.\n\n### Workarounds\n\nAt this stage there is no work around.","published":"2020-01-30T19:15:11.883Z","modified":"2026-11-26T01:00:40.360478037Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.01304,"percentile":0.70564,"asOf":"2026-11-25"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"github.com/oauth2-proxy/oauth2-proxy","fixedVersion":"5.0.0"}],"fix":{"url":"https://github.com/pusher/oauth2_proxy/commit/a316f8a06f3c0ca2b5fc5fa18a91781b313607b2","label":"pusher/oauth2_proxy@a316f8a"},"references":[{"type":"ADVISORY","url":"https://github.com/pusher/oauth2_proxy/releases/tag/v5.0.0"},{"type":"FIX","url":"https://github.com/pusher/oauth2_proxy/commit/a316f8a06f3c0ca2b5fc5fa18a91781b313607b2"},{"type":"FIX","url":"https://github.com/pusher/oauth2_proxy/security/advisories/GHSA-qqxw-m5fj-f7gv"},{"type":"WEB","url":"https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-qqxw-m5fj-f7gv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5233"},{"type":"WEB","url":"https://github.com/oauth2-proxy/oauth2_proxy/commit/a316f8a06f3c0ca2b5fc5fa18a91781b313607b2"},{"type":"WEB","url":"https://blog.detectify.com/2019/05/16/the-real-impact-of-an-open-redirect"},{"type":"WEB","url":"https://github.com/oauth2-proxy/oauth2_proxy/releases/tag/v5.0.0"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-26T01:00:40.360478037Z"}}