CVE-2022-31671 — harbor
HIGHCVE-2022-31671 is a high-severity (CVSS 7.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 reading and updating job execution logs through the P2P preheat execution logs
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-31671.
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 reading job execution logs through the P2P preheat execution logs - API call
GET /projects/{project_name}/preheat/policies/{preheat_policy_name}/executions/{execution_id}/tasks/{task_id}/logs
By sending a request that attempts to read P2P preheat execution logs and specifying different job ids, malicious authenticatedusers could read all the job logs stored in the Harbor database.
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-31671 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-31671 in your dependencies?
Find it across Go, including transitive dependencies.