CVE-2022-31667 Harbor fails to validate the user permissions when updating a robot account

Medium 6.4 Published Updated

Attackers can revoke permissions of robot accounts in projects they do not have access to by bypassing authorization checks during updates.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-31667?

CVE-2022-31667 is a medium-severity missing authorization vulnerability in Harbor, published on 14 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-863, CWE-285

Which versions are affected by CVE-2022-31667?

7 open source packages ship an affected version, including github.com/goharbor/harbor and harbor. It affects 1 product.

PackageAffectedFixed in
github.com/goharbor/harbor GoFrom 1.0.01.10.13
github.com/goharbor/harbor GoFrom 1.0.01.10.13
github.com/goharbor/harbor GoFrom 2.0.02.4.3
github.com/goharbor/harbor GoFrom 2.0.02.4.3
github.com/goharbor/harbor GoFrom 2.5.02.5.2
github.com/goharbor/harbor GoFrom 2.5.02.5.2
1 more packages
harbor BitnamiFrom 2.0.02.4.3, 2.5.2

Products include Linuxfoundation Harbor.

How do I fix CVE-2022-31667?

Upgrade github.com/goharbor/harbor to a fixed version for your release line: 1.10.13, 2.4.3 or 2.5.2.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2022-31667 being exploited?

There is no known exploitation of CVE-2022-31667 in the wild and no public exploit code.

Sources

Also known as BIT-harbor-2022-31667, GHSA-xx9w-464f-7h6f.

Is CVE-2022-31667 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free