{"id":"CVE-2020-5233","aliases":["BIT-oauth2-proxy-2020-5233","EUVD-2021-2572","GHSA-qqxw-m5fj-f7gv"],"status":"published","title":"Open Redirect in OAuth2 Proxy","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.01304,"percentile":0.70707,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-601"],"published":"2020-01-30T17:45:17Z","modified":"2026-10-24T10:49:46Z","fixes":[{"ecosystem":"Go","package":"github.com/oauth2-proxy/oauth2-proxy","fixed_in":["5.0.0"],"sources":["ghsa","osv"]},{"ecosystem":"Bitnami","package":"oauth2-proxy","fixed_in":["5.0.0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/oauth2-proxy/oauth2-proxy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.0.0"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"oauth2-proxy","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"5.0.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/oauth2-proxy/oauth2-proxy","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"5.0.0"}]}]}],"products":[{"vendor":"oauth2_proxy_project","product":"oauth2_proxy"},{"vendor":"pusher","product":"oauth2 proxy"}],"references":[{"url":"https://github.com/pusher/oauth2_proxy/security/advisories/GHSA-qqxw-m5fj-f7gv","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Third Party Advisory","advisory","fix"]},{"url":"https://github.com/pusher/oauth2_proxy/commit/a316f8a06f3c0ca2b5fc5fa18a91781b313607b2","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","advisory","fix"]},{"url":"https://github.com/pusher/oauth2_proxy/releases/tag/v5.0.0","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-5233","tags":["web","advisory"]},{"url":"https://blog.detectify.com/2019/05/16/the-real-impact-of-an-open-redirect/"},{"url":"https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-qqxw-m5fj-f7gv","tags":["web"]},{"url":"https://github.com/oauth2-proxy/oauth2_proxy/commit/a316f8a06f3c0ca2b5fc5fa18a91781b313607b2","tags":["web"]},{"url":"https://github.com/oauth2-proxy/oauth2_proxy/releases/tag/v5.0.0","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qqxw-m5fj-f7gv"},{"url":"https://blog.detectify.com/2019/05/16/the-real-impact-of-an-open-redirect","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2020-5233","title":"Open Redirect in OAuth2 Proxy","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","status":"published","published":"2020-01-30T17:45:17Z","modified":"2024-08-04T08:22:09.082Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:35:47.56691Z"}],"euvd":[{"id":"EUVD-2021-2572","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","status":"published","published":"2020-01-30T17:45:17Z","modified":"2024-08-04T08:22:09Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium"}],"updated_at":"2026-11-03T03:08:06.745484Z"}],"ghsa":[{"id":"GHSA-qqxw-m5fj-f7gv","title":"The pattern '/\\domain.com' is not disallowed when redirecting, allowing for open redirect","description":"### 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\u0026state=abc\u0026redirect_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, \"/\") \u0026\u0026 !strings.HasPrefix(redirect, \"//\"):\n+\tcase strings.HasPrefix(redirect, \"/\") \u0026\u0026 !strings.HasPrefix(redirect, \"//\") \u0026\u0026 !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.","status":"published","published":"2021-12-20T18:02:38Z","modified":"2023-01-09T05:05:06Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:36:11.367194Z"}],"nvd":[{"id":"CVE-2020-5233","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","status":"published","published":"2020-01-30T19:15:11.883Z","modified":"2026-06-17T03:21:04.743Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:05:53.837808Z"}],"osv":[{"id":"CVE-2020-5233","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","status":"published","published":"2020-01-30T19:15:11.883Z","modified":"2026-10-24T10:49:46.573008949Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:16.936975Z"},{"id":"GHSA-qqxw-m5fj-f7gv","title":"The pattern '/\\domain.com' is not disallowed when redirecting, allowing for open redirect","description":"### 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\u0026state=abc\u0026redirect_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, \"/\") \u0026\u0026 !strings.HasPrefix(redirect, \"//\"):\n+\tcase strings.HasPrefix(redirect, \"/\") \u0026\u0026 !strings.HasPrefix(redirect, \"//\") \u0026\u0026 !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.","status":"published","published":"2021-12-20T18:02:38Z","modified":"2026-07-08T06:00:28.621953661Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:H/A:L","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"BIT-oauth2-proxy-2020-5233","title":"Open Redirect in OAuth2 Proxy","description":"OAuth2 Proxy before 5.0 has an open redirect vulnerability. Authentication tokens could be silently harvested by an attacker. This has been patched in version 5.0.","status":"published","published":"2024-03-06T10:59:29.907Z","modified":"2026-09-08T08:48:10.898100518Z","updated_at":"2026-11-02T15:28:34.343258Z"}]}}
