CVE-2024-22244

CVE-2024-22244 is a medium-severity open redirect vulnerability in github.com/goharbor/harbor (go), affecting versions < 2.8.5. It is fixed in 2.8.5, 2.9.3, 2.10.1.

Summary

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 {
...

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])

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

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

CVE-2024-22244 has a CVSS score of 4.3 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.8.5, 2.9.3, 2.10.1); upgrading removes the vulnerable code path.

Affected versions

github.com/goharbor/harbor (< 2.8.5) github.com/goharbor/harbor (>= 2.9.0, < 2.9.3) github.com/goharbor/harbor (>= 2.10.0, < 2.10.1)

Security releases

github.com/goharbor/harbor → 2.8.5 (go) github.com/goharbor/harbor → 2.9.3 (go) github.com/goharbor/harbor → 2.10.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Harbor 2.8.5, Harbor 2.9.3, Harbor 2.10.1

Frequently Asked Questions

  1. What is CVE-2024-22244? CVE-2024-22244 is a medium-severity open redirect vulnerability in github.com/goharbor/harbor (go), affecting versions < 2.8.5. It is fixed in 2.8.5, 2.9.3, 2.10.1. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. How severe is CVE-2024-22244? CVE-2024-22244 has a CVSS score of 4.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/goharbor/harbor are affected by CVE-2024-22244? github.com/goharbor/harbor (go) versions < 2.8.5 is affected.
  4. Is there a fix for CVE-2024-22244? Yes. CVE-2024-22244 is fixed in 2.8.5, 2.9.3, 2.10.1. Upgrade to this version or later.
  5. Is CVE-2024-22244 exploitable, and should I be worried? Whether CVE-2024-22244 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-22244 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-22244?
    • Upgrade github.com/goharbor/harbor to 2.8.5 or later
    • Upgrade github.com/goharbor/harbor to 2.9.3 or later
    • Upgrade github.com/goharbor/harbor to 2.10.1 or later

Other vulnerabilities in github.com/goharbor/harbor

CVE-2025-30086CVE-2025-32019CVE-2022-31668CVE-2024-22278CVE-2024-22261

Stop the waste.
Protect your environment with Kodem.