CVE-2024-22244: Github.com/goharbor/harbor Open Redirect URL Vulnerability
MODERATECVE-2024-22244 is a MODERATE (CVSS 4.3) open redirect url vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Github.com/goharbor/harbor libraries in the Go ecosystem. The issue involves open redirect url in harbor. Remediation is available by upgrading affected packages to version 2.8.5, 2.9.3, 2.10.1.
CVE-2024-22244 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-22244
To remediate this vulnerability, upgrade all affected Github.com/goharbor/harbor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/goharbor/harbor to 2.8.5
Upgrade github.com/goharbor/harbor to 2.9.3
Upgrade github.com/goharbor/harbor to 2.10.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/goharbor/harbor
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-22244, inspect your project dependencies for Github.com/goharbor/harbor:
inspect dependencies for github.com/goharbor/harbor
Analyze the terminal output to locate any version of Github.com/goharbor/harbor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Github.com/goharbor/harbor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-22244 Affected Github.com/goharbor/harbor Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goharbor/harbor
|
Go |
< 2.8.5
|
2.8.5
|
|
github.com/goharbor/harbor
|
Go |
≥ 2.9.0
< 2.9.3
|
2.9.3
|
|
github.com/goharbor/harbor
|
Go |
≥ 2.10.0
< 2.10.1
|
2.10.1
|
References
Frequently Asked Questions
What is CVE-2024-22244?
Which Github.com/goharbor/harbor versions are affected?
What version fixes CVE-2024-22244?
Is github.com/goharbor/harbor affected?
What is the CVSS score of CVE-2024-22244?
What CWE is associated with CVE-2024-22244?
How can I check Go dependencies for CVE-2024-22244?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5757-v49g-f6r7",
"modified" : "2025-02-26T22:18:08Z",
"published" : "2024-06-02T22:32:32Z",
"aliases" : [ "CVE-2024-22244" ],
"summary" : "Open Redirect URL in Harbor",
"details" : "### Description\nUnder 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.\nFor example: if a user clicks the URL with a malicious redirect_url:\n```\nhttps://<harbor_hostnmae>/c/oidc/login?redirect_url=https://<redirect_domain>\n```\nIt might redirect the current user without their knowledge to a malicious site, posing a potential risk.\nTo avoid this issue, the redirect_url should be checked if it is a local path when reading it from the original request URL. \n```\n//src/core/controllers/oidc.go\n...\nredirectURL := oc.Ctx.Request.URL.Query().Get(\"redirect_url\")\nif !utils.IsLocalPath(redirectURL) {\n log.Errorf(\"invalid redirect url: %v\", redirectURL)\n oc.SendBadRequestError(fmt.Errorf(\"cannot redirect to other site\"))\n return\n}\nif err := oc.SetSession(redirectURLKey, redirectURL); err != nil {\n...\n```\n### Impact\nWhen 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.\n\nThe following versions of Harbor are involved:\n<=Harbor 2.8.4, <=Harbor 2.9.2, <= Harbor 2.10.0\n\n### Patches\nHarbor 2.8.5, Harbor 2.9.3, Harbor 2.10.1\n\n### Workarounds\nWhen the Harbor is configured with OIDC authentication, warn the user not to log into the Harbor through external links.\n\n### References\nN/A\n\n### Credit\nThanks Arnaud Cordier (arnaud@cordier.work)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.8.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.9.0"
}, {
"fixed" : "2.9.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.10.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-5757-v49g-f6r7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22244"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goharbor/harbor"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2915"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-06-02T22:32:32Z",
"nvd_published_at" : "2024-06-10T23:15:49Z"
}
}