CVE-2022-31668 User permission validation failure and disclosure of P2P preheat execution logs

High 7.4 Published Updated

Attackers can modify P2P preheat policies in unauthorized projects and access execution logs due to missing permission checks.

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-31668?

CVE-2022-31668 is a high-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 p2p preheat policies. By sending a request to update a p2p preheat policy with an id that belongs to a project that the currently authenticated user doesn't have access to, the attacker could modify p2p preheat policies configured in other projects.

Weakness: CWE-863, CWE-285

Which versions are affected by CVE-2022-31668?

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

PackageAffectedFixed in
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.0.0+incompatible2.4.3+incompatible, 2.5.2+incompatible
github.com/goharbor/harbor GoFrom 2.5.02.5.2
github.com/goharbor/harbor GoFrom 2.5.02.5.2
harbor BitnamiFrom 2.0.02.4.3, 2.5.2
2 more packages
github.com/goharbor/harbor/src GoAll versions0.0.0-20220630175814-b4ef1db
github.com/goharbor/harbor/src GoAll versions0.0.0-20220630175814-b4ef1db

Products include Linuxfoundation Harbor.

How do I fix CVE-2022-31668?

Upgrade github.com/goharbor/harbor to a fixed version for your release line: 2.4.3, 2.4.3+incompatible, 2.5.2+incompatible 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-31668 being exploited?

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

Sources

Also known as BIT-harbor-2022-31668, GHSA-3wpx-625q-22j7, GHSA-r864-28pw-8682, GO-2024-3268.

Is CVE-2022-31668 in your software?

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

Check your SBOMs for free