Safeguard
Vulnerability Analysis•

CVE-2022-31668: High Missing Authorization in Harbor P2P Preheat Policies

CVE-2022-31668 lets a Harbor user change P2P preheat policies in projects they cannot access. Upgrade to Harbor 2.4.3, 2.5.2 or later, preferably 2.5.3.

Safeguard Security Team
3 min read

CVE-2022-31668 is a high severity authorization flaw in Harbor, scored 7.4. An authenticated user can update P2P preheat policies that belong to projects they have no access to. The advisory lists patched versions 2.4.3 and 2.5.2, and its text recommends 2.5.3 or later, so upgrade to at least that.

What's affected

Harbor's advisory GHSA-3wpx-625q-22j7, published 29 August 2022, lists the Go module as affected in 2.x up to and including 2.4.2, and 2.5 up to and including 2.5.1. Patched versions are 2.4.3 and later in that line, and 2.5.2 and later. No workaround is available. The reporters credited are researchers from Oxeye Security.

The advisory is not consistent on the target version. The patched versions field says 2.5.2 and later, but its patches paragraph says this and other similar issues are fixed in Harbor 2.5.3 and later. Upgrading to 2.5.3 or newer satisfies both statements.

The advisory covers an API call that updates a preheat policy by name. A request that names a policy ID from a project the caller does not belong to modifies that other project's P2P preheat policy.

NVD and GitHub agree on a score of 7.4 High, with network vector, low privileges, changed scope and low impact to confidentiality, integrity and availability. The record's kev flag is false.

Weakness class per the record: CWE-285, CWE-863.

How to check if you're exposed

Find the Harbor version. The administration UI shows it, and the system information API reports it as harbor_version (it may need credentials depending on your setup):

curl -s https://harbor.example.com/api/v2.0/systeminfo

Replace the host name with your registry. Then compare the result with the patched versions above. If Harbor runs in Kubernetes, also check the image tags of the Harbor core component:

kubectl get pods -n harbor -o jsonpath='{.items[*].spec.containers[*].image}'

The free in-browser dependency scan at gold.safeguard.sh/scan can also help you see Harbor related components in a manifest you upload.

What to do now

  1. Find all Harbor instances and their versions.
  2. Upgrade to 2.5.3 or later, or to 2.4.3 or later if you must stay on the 2.4 line.
  3. Review P2P preheat policies in every project for entries nobody recognizes.
  4. Limit who gets accounts on the registry, including robot and service accounts, to those who need them.

Why it matters

Harbor is a registry, and in many companies it sits between build systems and production. Policies on tags, retention and image distribution protect what ships.

The flaw class is broken object level authorization. The API accepts an identifier for a policy, checks that you are logged in, and acts, without checking that the object belongs to a project you may change. Any authenticated user, including one with a low privileged role in one project, can reach other projects. That is why the advisory scores the scope as changed.

For preheat policies, the practical risk is tampering with how images are pushed to distribution providers, such as pointing preheating at the wrong place or disabling it. The impact scores are low for that reason, but cross project write access is a pattern worth fixing everywhere.

Quick check

Which fixed version should I choose?

Use 2.5.3 or later. The advisory's version field says 2.5.2, but its text says 2.5.3, and 2.5.3 satisfies both.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

We email you a link to confirm, and only then add you to the list. Unsubscribe in one click. Privacy

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.