{"id":"CVE-2020-11053","aliases":["CVE-2020-11053","GHSA-j7px-6hwj-hpjg","BIT-OAUTH2-PROXY-2020-11053"],"related":[],"kind":"vulnerability","state":"published","title":"Open Redirect in OAuth2 Proxy","summary":"In OAuth2 Proxy before 5.1.1, there is an open redirect vulnerability. Users can provide a redirect address for the proxy to send the authenticated user to at the end of the authentication flow. This is expected to be the original URL that the user was trying to access. This redirect URL is checked within the proxy and validated before redirecting the user to prevent malicious actors providing redirects to potentially harmful sites. However, by crafting a redirect URL with HTML encoded whitespace characters the validation could be bypassed and allow a redirect to any URL provided. This has been patched in 5.1.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In OAuth2 Proxy before 5.1.1, there is an open redirect vulnerability. Users can provide a redirect address for the proxy to send the authenticated user to at the end of the authentication flow. This is expected to be the original URL that the user was trying to access. This redirect URL is checked within the proxy and validated before redirecting the user to prevent malicious actors providing redirects to potentially harmful sites. However, by crafting a redirect URL with HTML encoded whitespace characters the validation could be bypassed and allow a redirect to any URL provided. This has been patched in 5.1.1.","source":"cvelist"},{"lang":"en","text":"### Impact\nAs users can provide a redirect address for the proxy to send the authenticated user to at the end of the authentication flow. This is expected to be the original URL that the user was trying to access.\nThis redirect URL is checked within the proxy and validated before redirecting the user to prevent malicious actors providing redirects to potentially harmful sites.\n\nHowever, by crafting a redirect URL with HTML encoded whitespace characters (eg. `%0a`, `%0b`,`%09`,`%0d`) the validation could be bypassed and allow a redirect to any URL provided.\n\n### Patches\n@rootxharsh and @iamnoooob provided this patch as potential solution:\n```\nFrom 4b941f56eda310b5c4dc8080b7635a6bfabccad4 Mon Sep 17 00:00:00 2001\nFrom: Harsh Jaiswal <harsh@pop-os.localdomain>\nDate: Fri, 1 May 2020 20:38:31 +0530\nSubject: [PATCH] Fixes redirect issue\n\n---\n oauthproxy.go | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/oauthproxy.go b/oauthproxy.go\nindex 1e9bb7c..f8beb4d 100644\n--- a/oauthproxy.go\n+++ b/oauthproxy.go\n@@ -577,8 +577,9 @@ func validOptionalPort(port string) bool {\n\n // IsValidRedirect checks whether the redirect URL is whitelisted\n func (p *OAuthProxy) IsValidRedirect(redirect string) bool {\n+       matched, _ := regexp.MatchString(`^/\\s+/|\\\\`, redirect)\n        switch {\n-       case strings.HasPrefix(redirect, \"/\") && !strings.HasPrefix(redirect, \"//\") && !strings.HasPrefix(redirect, \"/\\\\\"):\n+       case strings.HasPrefix(redirect, \"/\") && !strings.HasPrefix(redirect, \"//\") && !matched:\n                return true\n        case strings.HasPrefix(redirect, \"http://\") || strings.HasPrefix(redirect, \"https://\"):\n                redirectURL, err := url.Parse(redirect)\n--\n2.17.1\n```\n\nThis issue was also reported to us separately by @mik317 several hours later\n\nThe fix was implemented in [#xxx]() and released as version 5.1.1","format":"markdown","source":"ghsa"},{"lang":"es","text":"En OAuth2 Proxy versiones anteriores a 5.1.1, se presenta una vulnerabilidad de redireccionamiento abierto. Los usuarios pueden proporcionar una dirección de redireccionamiento para que el proxy envíe al usuario autenticado al final del flujo de autenticación. Se espera que esta sea la URL original a la que el usuario intentaba acceder. Esta URL de redireccionamiento es comprobada dentro del proxy y se valida antes de redireccionar al usuario para impedir que los actores maliciosos proporcionen redireccionamientos a sitios potencialmente dañinos. Sin embargo, al crear una URL de redireccionamiento con caracteres de espacio en blanco codificados en HTML, la validación podría ser omitida y permitir un redireccionamiento hacia cualquier URL proporcionada. Esto ha sido parcheado en la versión 5.1.1.","source":"nvd"}],"published":"2020-05-07T20:30:13.000Z","modified":"2026-09-10T16:01:44.424Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","score":5.8,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 5.1.1","status":"affected"}],"vendor":"OAuth2 Proxy","product":"OAuth2 Proxy","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.1.1"}],"ecosystem":"Go","package":"github.com/oauth2-proxy/oauth2-proxy","purl":"pkg:golang/github.com/oauth2-proxy/oauth2-proxy","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.1.1"}],"vendor":"oauth2_proxy_project","product":"oauth2_proxy","cpe":"cpe:2.3:a:oauth2_proxy_project:oauth2_proxy:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"5.1.1"}],"ecosystem":"Bitnami","package":"oauth2-proxy","purl":"pkg:bitnami/oauth2-proxy","source":"bitnami"}],"references":[{"url":"https://github.com/oauth2-proxy/oauth2-proxy/security/advisories/GHSA-j7px-6hwj-hpjg","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-11053","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/oauth2-proxy/oauth2-proxy/commit/0d5fa211df8ef2449347a56b22c779eb8d894c43","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-16T18:43:56.105Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-11053","url":"https://www.cve.org/CVERecord?id=CVE-2020-11053","licence":"CVE Terms of Use","modified":"2024-08-04T11:21:14.610Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j7px-6hwj-hpjg","url":"https://github.com/advisories/GHSA-j7px-6hwj-hpjg","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:10.270Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-11053","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-11053","licence":"Public domain","modified":"2026-06-17T02:48:57.090Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-OAUTH2-PROXY-2020-11053","url":"https://osv.dev/vulnerability/BIT-OAUTH2-PROXY-2020-11053","licence":"Apache-2.0","modified":"2026-09-10T16:01:44.424Z"}],"updatedAt":"2026-11-25T22:57:52.339Z","epss":{"score":0.0079,"percentile":0.5746,"date":"2026-12-01T12:00:22.000Z"}}