CVE-2022-31668: Github.com/goharbor/harbor Harbor Fails To Validate The Vulnerability
HIGHCVE-2022-31668 is a HIGH (CVSS 7.4) harbor fails to validate the vulnerability (CWE-285: Improper Authorization) affecting Github.com/goharbor/harbor libraries in the Go ecosystem. The issue involves harbor fails to validate the user permissions when updating p2p preheat policies. Remediation is available by upgrading affected packages to version 2.4.3, 2.5.2, 0.0.0-20220630175814-b4ef1db.
CVE-2022-31668 at a Glance
Security Impact
CVSS: 7.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L).
How to Fix CVE-2022-31668
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.4.3
Upgrade github.com/goharbor/harbor to 2.5.2
Upgrade github.com/goharbor/harbor/src to 0.0.0-20220630175814-b4ef1db
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-2022-31668, 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.4.3), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. 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-2022-31668 Affected Github.com/goharbor/harbor Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goharbor/harbor
|
Go |
≥ 2.0.0
< 2.4.3
|
2.4.3
|
|
github.com/goharbor/harbor
|
Go |
≥ 2.5.0
< 2.5.2
|
2.5.2
|
|
github.com/goharbor/harbor/src
|
Go |
< 0.0.0-20220630175814-b4ef1db
|
0.0.0-20220630175814-b4ef1db
|
References
Frequently Asked Questions
What is CVE-2022-31668?
Which Github.com/goharbor/harbor versions are affected?
What version fixes CVE-2022-31668?
Is github.com/goharbor/harbor affected?
Is github.com/goharbor/harbor/src affected?
What is the CVSS score of CVE-2022-31668?
What CWE is associated with CVE-2022-31668?
How can I check Go dependencies for CVE-2022-31668?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r864-28pw-8682",
"modified" : "2024-12-12T19:15:24Z",
"published" : "2024-11-14T12:31:02Z",
"aliases" : [ "CVE-2022-31668" ],
"summary" : "Harbor fails to validate the user permissions when updating p2p preheat policies",
"details" : "Harbor fails to validate the user permissions when updating p2p preheat policies. By sending a request to update a p2p preheat policy with an id that belongs to a project that the currently authenticated user doesn't have access to, the attacker could modify p2p preheat policies configured in other projects.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor/src"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20220630175814-b4ef1db"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-3wpx-625q-22j7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31668"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goharbor/harbor"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3268"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-14T18:33:49Z",
"nvd_published_at" : "2024-11-14T12:15:16Z"
}
}