CVE-2022-31667: Github.com/goharbor/harbor Harbor Fails To Validate The Vulnerability
MODERATECVE-2022-31667 is a MODERATE (CVSS 6.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 a robot account. Remediation is available by upgrading affected packages to version 1.10.13, 2.4.3, 2.5.2.
CVE-2022-31667 at a Glance
Security Impact
CVSS: 6.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:N/I:L/A:L).
How to Fix CVE-2022-31667
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 1.10.13
Upgrade github.com/goharbor/harbor to 2.4.3
Upgrade github.com/goharbor/harbor to 2.5.2
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-31667, 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 1.10.13), 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-31667 Affected Github.com/goharbor/harbor Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/goharbor/harbor
|
Go |
≥ 1.0.0
< 1.10.13
|
1.10.13
|
|
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
|
References
Frequently Asked Questions
What is CVE-2022-31667?
Which Github.com/goharbor/harbor versions are affected?
What version fixes CVE-2022-31667?
Is github.com/goharbor/harbor affected?
What is the CVSS score of CVE-2022-31667?
What CWE is associated with CVE-2022-31667?
How can I check Go dependencies for CVE-2022-31667?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xx9w-464f-7h6f",
"modified" : "2024-11-19T16:25:22Z",
"published" : "2022-09-16T20:27:13Z",
"aliases" : [ "CVE-2022-31667" ],
"summary" : " Harbor fails to validate the user permissions when updating a robot account",
"details" : "### Impact\nHarbor fails to validate the user permissions when updating a robot account that\nbelongs to a project that the authenticated user doesn’t have access to. API call:\n\nPUT /robots/{robot_id}\n\nBy sending a request that attempts to update a robot account, and specifying a robot\naccount id and robot account name that belongs to a different project that the user\ndoesn’t have access to, it was possible to revoke the robot account permissions.\n\n### Patches\nThis and similar issues are fixed in Harbor v2.5.2 and later. Please upgrade as soon as possible.\n\n### Workarounds\nThere are no workarounds available.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the Harbor GitHub repository](https://github.com/goharbor/harbor)\n\n### Credits\nThanks to [Gal Goldstein](https://www.linkedin.com/in/gal-goldshtein/) and [Daniel Abeles](https://www.linkedin.com/in/daniel-abeles/) from [Oxeye Security](https://www.oxeye.io/) for reporting this issue.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.10.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.10.12"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.4.2"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/goharbor/harbor"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0"
}, {
"fixed" : "2.5.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.5.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-xx9w-464f-7h6f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31667"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/goharbor/harbor"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-285", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-16T20:27:13Z",
"nvd_published_at" : "2024-11-14T12:15:16Z"
}
}