CVE-2023-20902 — harbor
MEDIUMCVE-2023-20902 is a medium-severity (CVSS 5.9) CWE-362 vulnerability in github.com/goharbor/harbor. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for github.com/goharbor/harbor — see the affected versions and patch details below.
Timing attack risk in Harbor
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-2023-20902.
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
In the Harbor jobservice container, the comparison of secrets in the authenticator type is prone to timing attacks. The vulnerability occurs due to the following code: https://github.com/goharbor/harbor/blob/aaea068cceb4063ab89313d9785f2b40f35b0d63/src/jobservice/api/authenticator.go#L69-L69 To avoid this issue, constant time comparison should be used.
subtle.ConstantTimeCompare([]byte(expectedSecret), []byte(secret)) == 0
Impact
This attack might be possible theoretically, but no workable proof of concept is available, and access complexity is set at High. The jobservice exposes these APIs
Create a job task --- POST /api/v1/jobs
Get job task information --- GET /api/v1/jobs/{job_id}
Stop job task --- POST /api/v1/jobs/{job_id}
Get job log task --- GET /api/v1/jobs/{job_id}/log
Get job execution --- GET /api/v1/jobs/{job_id}/executions
Get job stats --- GET /api/v1/stats
Get job service configuration --- GET /api/v1/config
It is used to create jobs/stop job tasks and retrieve job task information. If an attacker obtains the secrets, it is possible to retrieve the job information, create a job, or stop a job task.
The following versions of Harbor are involved: <=Harbor 2.8.2, <=Harbor 2.7.2, <= Harbor 2.6.x, <=Harbor 1.10.17
Patches
Harbor 2.8.3, Harbor 2.7.3, Harbor 1.10.18
Workarounds
Because the jobservice only exposes HTTP service to harbor-core containers, blocking any inbound traffic from the external network to the jobservice container can reduce the risk.
Credits
Thanks to Porcupiney Hairs for reporting this issue.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/goharbor/harbor | all versions | 1.10.18go get github.com/goharbor/harbor@v1.10.18 |
| 🐹Go | github.com/goharbor/harbor | ≥ 2.0.0&&< 2.7.3 | 2.7.3go get github.com/goharbor/harbor@v2.7.3 |
| 🐹Go | github.com/goharbor/harbor | ≥ 2.8.0&&< 2.8.3 | 2.8.3go get github.com/goharbor/harbor@v2.8.3 |
Affected Products
harborlinuxfoundationResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & 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.18 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-20902 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2023-20902 in your dependencies?
Find it across Go, including transitive dependencies.