CVE-2022-31667
JSON

6.4medium

Harbor fails to validate the user permissions when updating a robot account

Severity
6.4medium CVSS:3.1 by vmware
Exploit likelihood
0.52% (higher than 45% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
vmware
Also known as
GHSA-xx9w-464f-7h6fBIT-HARBOR-2022-31667

Description

Harbor fails to validate the user permissions when updating a robot account that belongs to a project that the authenticated user doesn’t have access to.  By sending a request that attempts to update a robot account, and specifying a robot account id and robot account name that belongs to a different project that the user doesn’t have access to, it was possible to revoke the robot account permissions.

Affected

Product or packageVersionsReported by
HarborHarbor (Go) 2.x<=2.4.2; 2.5<=2.5.1CVE List
github.com/goharbor/harbor (Go)from 1.0.0 before 1.10.13, from 2.0.0 before 2.4.3, from 2.5.0 before 2.5.2GitHub Advisory Database
linuxfoundation harborfrom 2.0.0 before 2.4.3, from 2.5.0 before 2.5.2NVD
harbor (Bitnami)from 2.0.0 before 2.4.3, from 2.5.0 before 2.5.2Bitnami Vulnerability Database

All scores

vmware6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L
GitHub6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L
NVD6.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L
Bitnami Vulnerability Databasemedium rating

Classification

CWE-285CWE-863

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Harbor fails to validate the user permissions when updating a robot account that belongs to a project that the authenticated user doesn’t have access to.  By sending a request that attempts to update a robot account, and specifying a robot account id and robot account name that belongs to a different project that the user doesn’t have access to, it was possible to revoke the robot account permissions.

GitHub Advisory Database
Impact

Harbor fails to validate the user permissions when updating a robot account that belongs to a project that the authenticated user doesn’t have access to. API call:

PUT /robots/{robot_id}

By sending a request that attempts to update a robot account, and specifying a robot account id and robot account name that belongs to a different project that the user doesn’t have access to, it was possible to revoke the robot account permissions.

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:

Credits

Thanks to Gal Goldstein and Daniel Abeles from Oxeye Security for reporting this issue.

NVD (es)

Harbor no puede validar los permisos de usuario al actualizar una cuenta de robot que pertenece a un proyecto al que el usuario autenticado no tiene acceso. Al enviar una solicitud que intenta actualizar una cuenta de robot y especificar un ID y un nombre de cuenta de robot que pertenecen a un proyecto diferente al que el usuario no tiene acceso, fue posible revocar los permisos de la cuenta de robot.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-31667 changed 2024-11-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-xx9w-464f-7h6f changed 2024-11-20CC-BY-4.0
NVDCVE-2022-31667 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-HARBOR-2022-31667 changed 2026-09-08Apache-2.0