CVE-2020-29662: Github.com/goharbor/harbor "catalog's Registry V2 Api Exposed Vulnerability

MODERATE
Advisory Identifier: GHSA-38r5-34mr-mvm7
CVSS 5.3
CWE-319 CWE-287
Published
Advisory Summary

CVE-2020-29662 is a MODERATE (CVSS 5.3) "catalog's registry v2 api exposed vulnerability (CWE-319: Cleartext Transmission of Sensitive Information) affecting Github.com/goharbor/harbor libraries in the Go ecosystem. The issue involves "catalog's registry v2 api exposed on unauthenticated path in harbor". Remediation is available by upgrading affected packages to version 2.0.5, 2.1.2.

CVE-2020-29662 at a Glance

CVE Identifier CVE-2020-29662
GHSA Identifier GHSA-38r5-34mr-mvm7
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-319: Cleartext Transmission of Sensitive Information
Affected Product Github.com/goharbor/harbor
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2020-29662

To remediate this vulnerability, upgrade all affected Github.com/goharbor/harbor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/goharbor/harbor fixed: 2.0.5
Upgrade github.com/goharbor/harbor to 2.0.5
github.com/goharbor/harbor fixed: 2.1.2
Upgrade github.com/goharbor/harbor to 2.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/goharbor/harbor

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-29662, inspect your project dependencies for Github.com/goharbor/harbor:

inspect dependencies for github.com/goharbor/harbor

Analyze the terminal output to locate any version of Github.com/goharbor/harbor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-319: Cleartext Transmission of Sensitive Information, where the product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. In Github.com/goharbor/harbor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### **Impact** Javier Provecho, member of the TCCT (Telefonica Cloud & Cybersecurity Tech better known as ElevenPaths) SRE team discovered a vulnerability regarding Harbor’s v2 API. The catalog’s registry v2 api is exposed on an unauthenticated path. The current catalog API path is served at the following path and it requires to be authenticated as an admin. "GET /v2/_catalog" However, the authorization can be bypassed by using the following path "GET /v2/_catalog/" ### **Patches** If your product uses the affected releases of Harbor, update to either version v2.1.2 or v2.0.5 to fix this issue immediately https://github.com/goharbor/harbor/releases/tag/v2.1.2 https://github.com/goharbor/harbor/releases/tag/v2.0.5 ### **Workarounds** If you cannot access a patched release, it can be mitigated by disabling that API. For example, redirecting it to a 404 sink hole in the ingress. ### **For more information** If you have any questions or comments about this advisory, contact cncf-harbor-security@lists.cncf.io View our security policy at https://github.com/goharbor/harbor/security/policy https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-29662

CVE-2020-29662 Affected Github.com/goharbor/harbor Versions

2 component(s)
Fixed Versions:
2.0.52.1.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/goharbor/harbor
Go
< 2.0.5
2.0.5
github.com/goharbor/harbor
Go
≥ 2.1.0
< 2.1.2
2.1.2

References

Frequently Asked Questions

What is CVE-2020-29662?
CVE-2020-29662 is a security vulnerability in Github.com/goharbor/harbor involving "catalog's registry v2 api exposed on unauthenticated path in Harbor" under CWE-319: Cleartext Transmission of Sensitive Information.
Which Github.com/goharbor/harbor versions are affected?
Affected versions include releases prior to 2.0.5, 2.1.2 across affected packages: github.com/goharbor/harbor.
What version fixes CVE-2020-29662?
Upgrading to 2.0.5, 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/goharbor/harbor affected?
Yes, github.com/goharbor/harbor is affected in releases prior to 2.0.5, 2.1.2. Upgrade your dependency to 2.0.5, 2.1.2 or later.
What is the CVSS score of CVE-2020-29662?
CVE-2020-29662 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2020-29662?
CVE-2020-29662 is classified under CWE-319: Cleartext Transmission of Sensitive Information (The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.).
How can I check Go dependencies for CVE-2020-29662?
Run the dependency tree command: 'inspect dependencies for github.com/goharbor/harbor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-38r5-34mr-mvm7",
  "modified" : "2022-02-12T00:01:51Z",
  "published" : "2022-02-12T00:01:51Z",
  "aliases" : [ "CVE-2020-29662" ],
  "summary" : "\"catalog's registry v2 api exposed on unauthenticated path in Harbor\"",
  "details" : "### **Impact**\nJavier Provecho, member of the TCCT (Telefonica Cloud & Cybersecurity Tech better known as ElevenPaths) SRE team discovered a vulnerability regarding Harbor’s v2 API.\n\nThe catalog’s registry v2 api is exposed on an unauthenticated path. The current catalog API path is served at the following path and it requires to be authenticated as an admin.\n\n\"GET /v2/_catalog\"\n\nHowever, the authorization can be bypassed by using the following path\n\n\"GET /v2/_catalog/\"\n\n### **Patches**\nIf your product uses the affected releases of Harbor, update to either version v2.1.2 or v2.0.5 to fix this issue immediately\n\nhttps://github.com/goharbor/harbor/releases/tag/v2.1.2\nhttps://github.com/goharbor/harbor/releases/tag/v2.0.5\n\n### **Workarounds**\nIf you cannot access a patched release, it can be mitigated by disabling that API. For example, redirecting it to a 404 sink hole in the ingress.\n\n### **For more information**\nIf you have any questions or comments about this advisory, contact cncf-harbor-security@lists.cncf.io\nView our security policy at https://github.com/goharbor/harbor/security/policy\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-29662",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/goharbor/harbor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/goharbor/harbor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-38r5-34mr-mvm7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-29662"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/pull/13676"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/commit/3481722f140e1fdf6e6d290b0cd5c86e509feed4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/commit/c7c409a8e5a8b3fd42841dda84759c9d77977853"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/releases/tag/v2.0.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/releases/tag/v2.1.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-319" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-21T19:00:31Z",
    "nvd_published_at" : null
  }
}