CVE-2022-31669 — harbor
MEDIUMCVE-2022-31669 is a medium-severity (CVSS 6.4) CWE-285 vulnerability in github.com/goharbor/harbor. A fix is available for github.com/goharbor/harbor — see the affected versions and patch details below.
Harbor fails to validate the user permissions when updating tag immutability policies
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/goharbor/harbor🐹github.com/goharbor/harbor🐹github.com/goharbor/harborReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Harbor fails to validate the user permissions when updating tag immutability policies - API call:
PUT /projects/{project_name_or_id}/immutabletagrules/{immutable_rule_id}
By sending a request to update a tag immutability policy with an id that belongs to a project that the currently authenticated user doesn’t have access to, the attacker could modify tag immutability policies configured in other projects.
Patches
This and similar issues are fixed in Harbor v2.5.2 and later. Please upgrade as soon as possible.
Workarounds
There are no workarounds available.
For more information
If you have any questions or comments about this advisory:
- Open an issue in the Harbor GitHub repository
Credits
Thanks to Gal Goldstein and Daniel Abeles from Oxeye Security for reporting this issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/goharbor/harbor | ≥ 1.0.0&&< 1.10.13 | 1.10.13go get github.com/goharbor/harbor@v1.10.13 |
| 🐹Go | github.com/goharbor/harbor | ≥ 2.0.0&&< 2.4.3 | 2.4.3go get github.com/goharbor/harbor@v2.4.3 |
| 🐹Go | github.com/goharbor/harbor | ≥ 2.5.0&&< 2.5.2 | 2.5.2go get github.com/goharbor/harbor@v2.5.2 |
Affected Products
harborlinuxfoundationDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/goharbor/harbor, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/goharbor/harbor to 1.10.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-31669 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Frequently Asked Questions
Is CVE-2022-31669 in your dependencies?
Find it across Go, including transitive dependencies.