VYPR
High severityNVD Advisory· Published Nov 14, 2024· Updated Nov 14, 2024

Harbor fails to validate the user permissions when updating tag retention policies

CVE-2022-31670

Description

Harbor fails to validate the user permissions when updating tag retention policies.

By sending a request to update a tag retention policy with an id that belongs to a project that the currently authenticated user doesn’t have access to, the attacker could modify tag retention policies configured in other projects.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Harbor fails to validate user permissions when updating tag retention policies, allowing an authenticated attacker to modify policies in projects they do not have access to.

Vulnerability

Description CVE-2022-31670 is an authorization bypass vulnerability in the Harbor container registry. The root cause is that the PUT /retentions/{id} API endpoint does not verify whether the authenticated user has the necessary permissions for the project associated with the given retention policy ID [1][3]. This missing validation allows a user to update tag retention policies that belong to projects they are not authorized to access.

Exploitation

An attacker can exploit this vulnerability by sending a crafted PUT request to update a tag retention policy, specifying an id that belongs to a project the attacker does not have access to. The only prerequisite is that the attacker must be an authenticated user of the Harbor instance [1][3]. No other special privileges are required, making this a low-complexity attack against authorization controls.

Impact

Successful exploitation enables the attacker to modify tag retention policies configured in other projects. Depending on the policy configuration, this could allow an attacker to retain or delete container images in projects they should not control, potentially leading to data loss or unauthorized retention of sensitive artifacts [1][3].

Mitigation

Harbor has fixed this issue in version 2.5.2 and later [3]. There are no workarounds available, so affected users should upgrade to a patched version as soon as possible [3].

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/goharbor/harborGo
>= 1.0.0, < 1.10.131.10.13
github.com/goharbor/harborGo
>= 2.0.0, < 2.4.32.4.3
github.com/goharbor/harborGo
>= 2.5.0, < 2.5.22.5.2

Affected products

3

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

3

News mentions

0

No linked articles in our index yet.