Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/goharbor/harbor
  4. ›
  5. CVE-2024-22278

CVE-2024-22278: Harbor fails to validate the user permissions when updating project configurations

July 31, 2024 (updated November 18, 2024)

Harbor fails to validate the maintainer role permissions when creating/updating/deleting project configurations - API call:

  • PUT /projects/{project_name_or_id}/metadatas/{meta_name}
  • POST /projects/{project_name_or_id}/metadatas/{meta_name}
  • DELETE /projects/{project_name_or_id}/metadatas/{meta_name}

By sending a request to create/update/delete a metadata with an name that belongs to a project that the currently authenticated and granted to the maintainer role user doesn’t have access to, the attacker could modify configurations in the current project.

BTW: the maintainer role in Harbor was intended for individuals who closely support the project admin in maintaining the project but lack configuration management permissions. However, the maintainer role can utilize the metadata API to circumvent this limitation. It’s important to note that any potential attacker must be authenticated and granted a specific project maintainer role to modify configurations, limiting their scope to only that project.

References

  • github.com/advisories/GHSA-hw28-333w-qxp3
  • github.com/goharbor/harbor
  • github.com/goharbor/harbor/security/advisories/GHSA-hw28-333w-qxp3
  • nvd.nist.gov/vuln/detail/CVE-2024-22278
  • pkg.go.dev/vuln/GO-2024-3013

Code Behaviors & Features

Detect and mitigate CVE-2024-22278 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.9.5, all versions starting from 2.10.0 before 2.10.3

Fixed versions

  • 2.9.5
  • 2.10.3

Solution

Upgrade to versions 2.10.3, 2.9.5 or above.

Impact 4.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-269: Improper Privilege Management

Source file

go/github.com/goharbor/harbor/CVE-2024-22278.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:03 +0000.