CVE-2020-5233: Open Redirect Vulnerability in oauth2-proxy

Summary

20/12/2021
Yes i
Moderate
5.9

CVE-2020-5233: The pattern '/\domain.com' is not disallowed when redirecting, allowing for open redirect. Affects github.com/oauth2-proxy/oauth2-proxy versions < 5.0.0. Fixed in 5.0.0. How to fix ↓

Also tracked for

The same CVE-2020-5233 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

oauth2-proxy is a Go package that provides a reverse proxy for authenticating requests using OAuth2 providers. It allows users to protect their applications by handling authentication and authorization. However, a vulnerability has been discovered in oauth2-proxy that allows for open redirect attacks.

Vulnerability Detail

The vulnerability (CVE-2020-5233) in oauth2-proxy arises from the improper handling of redirect URLs. When redirecting, the pattern '/\domain.com' is not disallowed, which enables an attacker to perform open redirect attacks. This means that an attacker can craft a malicious URL that redirects users to a different domain, potentially leading to the theft of authentication tokens. The impact of this vulnerability can be severe, as it allows for the silent harvesting of users' authentication tokens.

How To Fix

Latest published version: v3.2.0+incompatible as of 22 Oct 2026

go get github.com/oauth2-proxy/oauth2-proxy@v3.2.0+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.0.0

This is the first release that contains the fix.

go get github.com/oauth2-proxy/oauth2-proxy@v5.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there is no known workaround for this vulnerability. It is recommended to apply the provided patch as soon as it becomes available.

Conclusion

The open redirect vulnerability in oauth2-proxy (CVE-2020-5233) allows for the silent harvesting of users' authentication tokens. It is crucial to apply the provided patch as soon as it becomes available to mitigate the risk of open redirect attacks. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/oauth2-proxy/oauth2-proxy →

Share this vulnerability

FAQ

The impact of this vulnerability is that an attacker can craft a malicious URL that redirects users to a different domain, potentially leading to the theft of authentication tokens.

To fix this vulnerability, you should apply the provided patch to oauth2-proxy. The patch disallows URLs that start with '/\' in the redirect validation process.

Currently, there is no known workaround for this vulnerability. It is recommended to apply the provided patch as soon as it becomes available.

The patch for this vulnerability can be found in the oauthproxy.go file. It modifies the IsValidRedirect function to disallow URLs that start with '/\'.

The patch will be included in the next release of oauth2-proxy. The release date has not been specified.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/oauth2-proxy/oauth2-proxy.

How To Fix

Latest published version: v3.2.0+incompatible as of 22 Oct 2026

go get github.com/oauth2-proxy/oauth2-proxy@v3.2.0+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.0.0

This is the first release that contains the fix.

go get github.com/oauth2-proxy/oauth2-proxy@v5.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback