CVE-2024-22278: Github.com/goharbor/harbor Harbor Fails To Validate The Vulnerability
HIGHCVE-2024-22278 is a HIGH (CVSS 5.5) harbor fails to validate the vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/goharbor/harbor libraries in the Go ecosystem. The issue involves harbor fails to validate the user permissions when updating project configurations. Remediation is available by upgrading affected packages to version 2.9.5, 2.10.3.
CVE-2024-22278 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N).
How to Fix CVE-2024-22278
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.9.5
Upgrade github.com/goharbor/harbor to 2.10.3
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-22278, 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.9.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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. 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-22278 Affected Github.com/goharbor/harbor Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goharbor/harbor
|
Go |
< 2.9.5
|
2.9.5
|
|
github.com/goharbor/harbor
|
Go |
≥ 2.10.0
< 2.10.3
|
2.10.3
|
References
Frequently Asked Questions
What is CVE-2024-22278?
Which Github.com/goharbor/harbor versions are affected?
What version fixes CVE-2024-22278?
Is github.com/goharbor/harbor affected?
What is the CVSS score of CVE-2024-22278?
What CWE is associated with CVE-2024-22278?
How can I check Go dependencies for CVE-2024-22278?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hw28-333w-qxp3",
"modified" : "2024-11-18T16:26:57Z",
"published" : "2024-07-31T16:53:13Z",
"aliases" : [ "CVE-2024-22278" ],
"summary" : "Harbor fails to validate the user permissions when updating project configurations",
"details" : "### Impact\nHarbor fails to validate the maintainer role permissions when creating/updating/deleting project configurations - API call:\n\n- PUT /projects/{project_name_or_id}/metadatas/{meta_name}\n- POST /projects/{project_name_or_id}/metadatas/{meta_name}\n- DELETE /projects/{project_name_or_id}/metadatas/{meta_name}\n\nBy sending a request to create/update/delete a metadata with an name that belongs to a project that the currently authenticated and granted to the maintainer role user doesn’t have access to, the attacker could modify configurations in the current project.\n\nBTW: the maintainer role in Harbor was intended for individuals who closely support the project admin in maintaining the project but lack configuration management permissions. However, the maintainer role can utilize the metadata API to circumvent this limitation. It's important to note that any potential attacker must be authenticated and granted a specific project maintainer role to modify configurations, limiting their scope to only that project.\n\n\n### Patches\nWill be fixed in v2.9.5, v2.10.3 and v2.11.0\n\n### Workarounds\nThere are no workarounds available.\n\n### Credit\nThanks to Ravid Mazon(rmazon@paloaltonetworks.com), Jay Chen (jaychen@paloaltonetworks.com) Palo Alto Networks for reporting this issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:L/VI:L/VA:H/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.9.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.10.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-hw28-333w-qxp3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-22278"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goharbor/harbor"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3013"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-269" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-31T16:53:13Z",
"nvd_published_at" : "2024-08-02T01:15:23Z"
}
}