CVE-2020-13794: Github.com/goharbor/harbor Authenticated Users Can Exploit An Vulnerability

MODERATE
Advisory Identifier: GHSA-q9p8-33wc-h432
CVSS 4.3
CWE-862
Published
Advisory Summary

CVE-2020-13794 is a MODERATE (CVSS 4.3) authenticated users can exploit an vulnerability (CWE-862: Missing Authorization) affecting Github.com/goharbor/harbor libraries in the Go ecosystem. The issue involves authenticated users can exploit an enumeration vulnerability in harbor. Remediation is available by upgrading affected packages to version 2.0.3.

CVE-2020-13794 at a Glance

CVE Identifier CVE-2020-13794
GHSA Identifier GHSA-q9p8-33wc-h432
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-862: Missing Authorization
Affected Product Github.com/goharbor/harbor
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.3

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-13794

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.3
Upgrade github.com/goharbor/harbor to 2.0.3
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-13794, 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.3), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. 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** Hidde Smit from Cyber Eagle has discovered an User Enumeration flaw in Harbor. The issue is present in the "/users" api endpoint. This endpoint is supposed to be restricted to administrators. This restriction is able to be bypassed and information can be obtained via the "search" functionality. Non-administrator users (such as those created via self-registration) can list all usernames and user IDs by sending a GET request to /api/users/search with parameter "username" and value "_", as follows: `curl -X GET "https://<host>/api/users/search?username=_" -H "accept: application/json" --user <user>:<password>` The vulnerability was immediately fixed by the Harbor team and all supported versions were patched. With the patched versions of Harbor, the username is required for search and we have removed the support for querying by email. ### **Patches** If your product uses the affected releases of Harbor, update to either version 2.1.0 or 2.0.3 to fix this issue immediately https://github.com/goharbor/harbor/releases/tag/v2.1.0 https://github.com/goharbor/harbor/releases/tag/v2.0.3 ### **Workarounds** There is no workaround for this issue ### **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-13794

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

1 component(s)
Fixed Versions:
2.0.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/goharbor/harbor
Go
< 2.0.3
2.0.3

References

Frequently Asked Questions

What is CVE-2020-13794?
CVE-2020-13794 is a security vulnerability in Github.com/goharbor/harbor involving Authenticated users can exploit an enumeration vulnerability in Harbor under CWE-862: Missing Authorization.
Which Github.com/goharbor/harbor versions are affected?
Affected versions include releases prior to 2.0.3 across affected packages: github.com/goharbor/harbor.
What version fixes CVE-2020-13794?
Upgrading to 2.0.3 (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.3. Upgrade your dependency to 2.0.3 or later.
What is the CVSS score of CVE-2020-13794?
CVE-2020-13794 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2020-13794?
CVE-2020-13794 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2020-13794?
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-q9p8-33wc-h432",
  "modified" : "2022-10-05T17:58:07Z",
  "published" : "2021-05-24T16:58:06Z",
  "aliases" : [ "CVE-2020-13794" ],
  "summary" : "Authenticated users can exploit an enumeration vulnerability in Harbor",
  "details" : "### **Impact**\n\nHidde Smit from Cyber Eagle has discovered an User Enumeration flaw in Harbor. The issue is present in the \"/users\" api endpoint. This endpoint is supposed to be restricted to administrators. This restriction is able to be bypassed and information can be obtained via the \"search\" functionality.\n\nNon-administrator users (such as those created via self-registration) can list all usernames and user IDs by sending a GET request to /api/users/search with parameter \"username\" and value \"_\", as follows:\n\n`curl -X GET \"https://<host>/api/users/search?username=_\" -H \"accept: application/json\" --user <user>:<password>`\n\nThe vulnerability was immediately fixed by the Harbor team and all supported versions were patched. With the patched versions of Harbor, the username is required for search and we have removed the support for querying by email.\n\n### **Patches**\nIf your product uses the affected releases of Harbor, update to either version 2.1.0 or 2.0.3 to fix this issue immediately\n\nhttps://github.com/goharbor/harbor/releases/tag/v2.1.0\nhttps://github.com/goharbor/harbor/releases/tag/v2.0.3\n\n### **Workarounds**\nThere is no workaround for this issue\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-13794",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/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.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/security/advisories/GHSA-q9p8-33wc-h432"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-13794"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/goharbor/harbor"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/releases"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/releases/tag/v2.0.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/goharbor/harbor/releases/tag/v2.1.0"
  }, {
    "type" : "WEB",
    "url" : "https://www.cybereagle.io/blog/cve-2020-13794"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-24T12:51:00Z",
    "nvd_published_at" : "2020-09-30T18:15:00Z"
  }
}