Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/goharbor/harbor
  4. ›
  5. CVE-2024-22244

CVE-2024-22244: Open Redirect URL in Harbor

June 2, 2024 (updated February 26, 2025)

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

References

  • github.com/advisories/GHSA-5757-v49g-f6r7
  • github.com/goharbor/harbor
  • github.com/goharbor/harbor/security/advisories/GHSA-5757-v49g-f6r7
  • nvd.nist.gov/vuln/detail/CVE-2024-22244
  • pkg.go.dev/vuln/GO-2024-2915

Code Behaviors & Features

Detect and mitigate CVE-2024-22244 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.8.5, all versions starting from 2.9.0 before 2.9.3, all versions starting from 2.10.0 before 2.10.1

Fixed versions

  • 2.8.5
  • 2.9.3
  • 2.10.1

Solution

Upgrade to versions 2.10.1, 2.8.5, 2.9.3 or above.

Impact 4.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

go/github.com/goharbor/harbor/CVE-2024-22244.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:07 +0000.