CVE-2024-22244: Open Redirect URL in Harbor
Description Under OIDC authentication mode, there is a redirecturl parameter exposed in the URL which is used to redirect the current user to the defined location after the successful OIDC login, This redirecturl can be an ambiguous URL and can be used to embed a phishing URL.
Published Jun 2, 2024 · Updated Jun 17, 2024
Affected packages
github.com/goharbor/harbor
- Ecosystem
- Go
- Affected
- < 2.8.5
- Fixed in
- 2.8.5
- Check
go list -m github.com/goharbor/harbor
github.com/goharbor/harbor
- Ecosystem
- Go
- Affected
- >= 2.9.0, < 2.9.3
- Fixed in
- 2.9.3
- Check
go list -m github.com/goharbor/harbor
github.com/goharbor/harbor
- Ecosystem
- Go
- Affected
- >= 2.10.0, < 2.10.1
- Fixed in
- 2.10.1
- Check
go list -m github.com/goharbor/harbor
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Description
Under OIDC authentication mode, there is a redirect_url parameter exposed in the URL which is used to redirect the current user to the defined location after the successful OIDC login, This redirect_url can be an ambiguous URL and can be used to embed a phishing URL. For example: if a user clicks the URL with a malicious redirect_url:
https://<harbor_hostnmae>/c/oidc/login?redirect_url=https://<redirect_domain>It might redirect the current user without their knowledge to a malicious site, posing a potential risk. To avoid this issue, the redirect_url should be checked if it is a local path when reading it from the original request URL.
//src/core/controllers/oidc.go
...
redirectURL := oc.Ctx.Request.URL.Query().Get("redirect_url")
if !utils.IsLocalPath(redirectURL) {
log.Errorf("invalid redirect url: %v", redirectURL)
oc.SendBadRequestError(fmt.Errorf("cannot redirect to other site"))
return
}
if err := oc.SetSession(redirectURLKey, redirectURL); err != nil {
...Impact
When Harbor is configured with OIDC authentication and users log in via a link outside the Harbor server, it might be vulnerable to an open redirect attack. This attack only involves the OIDC Harbor user, if the current Harbor instance is not configured with OIDC auth, the redirect_url doesn't exist and the Harbor instance is not vulnerable to the open redirect attack.
The following versions of Harbor are involved: <=Harbor 2.8.4, <=Harbor 2.9.2, <= Harbor 2.10.0
Patches
Harbor 2.8.5, Harbor 2.9.3, Harbor 2.10.1
Workarounds
When the Harbor is configured with OIDC authentication, warn the user not to log into the Harbor through external links.
References
N/A
Credit
Thanks Arnaud Cordier ([email protected])
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesGHSA-prh4-vhfh-24mj
Harbor: LDAP password and OIDC secret are not redacted in the audit log
medium6.9Mar 26, 2026CVE-2026-4404
Harbor allows the use of the default password for web UI login
critical9.4No fixMar 23, 2026CVE-2025-30086
Possible ORM Leak Vulnerability in the Harbor
medium4.9Jul 23, 2025CVE-2025-32019
Harbor repository description page has Cross-site Scripting vulnerability
medium4.1No fixJul 23, 2025CVE-2022-31668
Harbor fails to validate the user permissions when updating p2p preheat policies
high7.4Nov 14, 2024CVE-2024-22278
Harbor fails to validate the user permissions when updating project configurations
high5.5Jul 31, 2024
