{"id":"CVE-2023-20902","aliases":["BIT-harbor-2023-20902","GHSA-mq6f-5xh5-hgcf","GO-2023-2109"],"url":"https://o3.security/vulnerability/CVE-2023-20902","summary":"Timing attack risk in Harbor","details":"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\nTo avoid this issue, constant time comparison should be used.\n```\nsubtle.ConstantTimeCompare([]byte(expectedSecret), []byte(secret)) == 0\n```\n\n### Impact\nThis attack might be possible theoretically, but no workable proof of concept is available, and access complexity is set at High.\nThe jobservice exposes these APIs\n```\nCreate a job task --- POST /api/v1/jobs    \nGet job task information --- GET /api/v1/jobs/{job_id}\nStop job task ---  POST /api/v1/jobs/{job_id}\nGet job log task ---  GET /api/v1/jobs/{job_id}/log\nGet job execution --- GET /api/v1/jobs/{job_id}/executions\nGet job stats ---  GET /api/v1/stats\nGet job service configuration ---  GET /api/v1/config\n```\nIt 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. \n\nThe following versions of Harbor are involved:\n<=Harbor 2.8.2, <=Harbor 2.7.2, <= Harbor 2.6.x, <=Harbor 1.10.17\n\n\n### Patches\nHarbor 2.8.3, Harbor 2.7.3, Harbor 1.10.18\n\n### Workarounds\nBecause 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.\n\n### Credits\nThanks to Porcupiney Hairs for reporting this issue.\n","published":"2023-11-09T00:36:25.369Z","modified":"2026-10-28T02:30:40.720854605Z","cvss":{"score":5.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"},"epss":{"score":0.00373,"percentile":0.30615,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"github.com/goharbor/harbor","fixedVersion":"1.10.18"},{"ecosystem":"Go","name":"github.com/goharbor/harbor","fixedVersion":"2.7.3"},{"ecosystem":"Go","name":"github.com/goharbor/harbor","fixedVersion":"2.8.3"}],"fix":null,"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/20xxx/CVE-2023-20902.json"},{"type":"ADVISORY","url":"https://github.com/goharbor/harbor/security/advisories/GHSA-mq6f-5xh5-hgcf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-20902"},{"type":"PACKAGE","url":"https://github.com/goharbor/harbor"},{"type":"WEB","url":"https://github.com/goharbor/harbor/blob/aaea068cceb4063ab89313d9785f2b40f35b0d63/src/jobservice/api/authenticator.go#L69-L69"},{"type":"WEB","url":"https://github.com/goharbor/harbor/releases/tag/v1.10.18"},{"type":"WEB","url":"https://github.com/goharbor/harbor/releases/tag/v2.7.3"},{"type":"WEB","url":"https://github.com/goharbor/harbor/releases/tag/v2.8.3"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:40.720854605Z"}}