CVE-2018-20321: Github.com/rancher/rancher Access Control Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-9qq2-xhmc-h9qr
CVSS 4.2
CWE-668 CWE-288
Published
Advisory Summary

CVE-2018-20321 is a MODERATE (CVSS 4.2) access control bypass vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Github.com/rancher/rancher libraries in the Go ecosystem. The issue involves access control bypass. Remediation is available by upgrading affected packages to version 2.1.6.

CVE-2018-20321 at a Glance

CVE Identifier CVE-2018-20321
GHSA Identifier GHSA-9qq2-xhmc-h9qr
Severity MODERATE
CVSS v3.1 Base Score 4.2
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Github.com/rancher/rancher
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.2

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

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

How to Fix CVE-2018-20321

To remediate this vulnerability, upgrade all affected Github.com/rancher/rancher 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/rancher/rancher fixed: 2.1.6
Upgrade github.com/rancher/rancher to 2.1.6
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/rancher/rancher

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-20321, inspect your project dependencies for Github.com/rancher/rancher:

inspect dependencies for github.com/rancher/rancher

Analyze the terminal output to locate any version of Github.com/rancher/rancher in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.6), 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Github.com/rancher/rancher, 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

An issue was discovered in Rancher 2 through 2.1.5. Any project member with access to the default namespace can mount the netes-default service account in a pod, and then use that pod to execute administrative privileged commands against the k8s cluster. This could be mitigated by isolating the default namespace in a separate project, where only cluster admins can be given permissions to access. As of 2018-12-20, this bug affected ALL clusters created or imported by Rancher.

CVE-2018-20321 Affected Github.com/rancher/rancher Versions

1 component(s)
Fixed Versions:
2.1.6
Product / Package Ecosystem Affected Versions Fixed Version
github.com/rancher/rancher
Go
≥ 2.0.0
< 2.1.6
2.1.6

References

Frequently Asked Questions

What is CVE-2018-20321?
CVE-2018-20321 is a security vulnerability in Github.com/rancher/rancher involving Access Control Bypass under CWE-668: Exposure of Resource to Wrong Sphere.
Which Github.com/rancher/rancher versions are affected?
Affected versions include releases prior to 2.1.6 across affected packages: github.com/rancher/rancher.
What version fixes CVE-2018-20321?
Upgrading to 2.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/rancher/rancher affected?
Yes, github.com/rancher/rancher is affected in releases prior to 2.1.6. Upgrade your dependency to 2.1.6 or later.
What is the CVSS score of CVE-2018-20321?
CVE-2018-20321 has a CVSS v3.1 base score of 4.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2018-20321?
CVE-2018-20321 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check Go dependencies for CVE-2018-20321?
Run the dependency tree command: 'inspect dependencies for github.com/rancher/rancher'. 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-9qq2-xhmc-h9qr",
  "modified" : "2022-04-25T20:20:41Z",
  "published" : "2021-06-23T17:57:10Z",
  "aliases" : [ "CVE-2018-20321" ],
  "summary" : "Access Control Bypass",
  "details" : "An issue was discovered in Rancher 2 through 2.1.5. Any project member with access to the default namespace can mount the netes-default service account in a pod, and then use that pod to execute administrative privileged commands against the k8s cluster. This could be mitigated by isolating the default namespace in a separate project, where only cluster admins can be given permissions to access. As of 2018-12-20, this bug affected ALL clusters created or imported by Rancher.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rancher/rancher"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-20321"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rancher/rancher/commit/6ea187fcc2309d5a7a14ed47de5688bf6573f448"
  }, {
    "type" : "WEB",
    "url" : "https://forums.rancher.com/c/announcements"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rancher/rancher"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rancher/rancher/releases/tag/v2.1.6"
  }, {
    "type" : "WEB",
    "url" : "https://rancher.com/blog/2019/2019-01-29-explaining-security-vulnerabilities-addressed-in-rancher-v2-1-6-and-v2-0-11"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-288", "CWE-668" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-12T18:10:58Z",
    "nvd_published_at" : "2019-04-10T14:29:00Z"
  }
}