CVE-2018-6558: Github.com/google/fscrypt Privilege Escalation Vulnerability

MODERATE
Advisory Identifier: GHSA-qj26-7grj-whg3
CVSS 6.5
Published
Advisory Summary

CVE-2018-6558 is a MODERATE (CVSS 6.5) privilege escalation vulnerability (General Security Weakness) affecting Github.com/google/fscrypt libraries in the Go ecosystem. The issue involves privilege escalation in fscrypt. Remediation is available by upgrading affected packages to version 0.2.4.

CVE-2018-6558 at a Glance

CVE Identifier CVE-2018-6558
GHSA Identifier GHSA-qj26-7grj-whg3
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification General Security Weakness
Affected Product Github.com/google/fscrypt
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2018-6558

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

How to Check if You Are Affected

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

inspect dependencies for github.com/google/fscrypt

Analyze the terminal output to locate any version of Github.com/google/fscrypt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.4), 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 General Security Weakness. In Github.com/google/fscrypt, 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

The pam_fscrypt module in fscrypt before 0.2.4 may incorrectly restore primary and supplementary group IDs to the values associated with the root user, which allows attackers to gain privileges via a successful login through certain applications that use Linux-PAM (aka pam).

CVE-2018-6558 Affected Github.com/google/fscrypt Versions

1 component(s)
Fixed Versions:
0.2.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/google/fscrypt
Go
< 0.2.4
0.2.4

References

Frequently Asked Questions

What is CVE-2018-6558?
CVE-2018-6558 is a security vulnerability in Github.com/google/fscrypt involving Privilege Escalation in fscrypt under General Security Weakness.
Which Github.com/google/fscrypt versions are affected?
Affected versions include releases prior to 0.2.4 across affected packages: github.com/google/fscrypt.
What version fixes CVE-2018-6558?
Upgrading to 0.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/google/fscrypt affected?
Yes, github.com/google/fscrypt is affected in releases prior to 0.2.4. Upgrade your dependency to 0.2.4 or later.
What is the CVSS score of CVE-2018-6558?
CVE-2018-6558 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-6558?
CVE-2018-6558 is classified under General Security Weakness.
How can I check Go dependencies for CVE-2018-6558?
Run the dependency tree command: 'inspect dependencies for github.com/google/fscrypt'. 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-qj26-7grj-whg3",
  "modified" : "2024-05-20T19:39:08Z",
  "published" : "2021-06-23T17:18:49Z",
  "aliases" : [ "CVE-2018-6558" ],
  "summary" : "Privilege Escalation in fscrypt",
  "details" : "The pam_fscrypt module in fscrypt before 0.2.4 may incorrectly restore primary and supplementary group IDs to the values associated with the root user, which allows attackers to gain privileges via a successful login through certain applications that use Linux-PAM (aka pam).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/google/fscrypt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-6558"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/fscrypt/issues/77"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/fscrypt/commit/3022c1603d968c22f147b4a2c49c4637dd1be91b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/google/fscrypt/commit/315f9b042237200174a1fb99427f74027e191d66"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/google/fscrypt"
  }, {
    "type" : "WEB",
    "url" : "https://launchpad.net/bugs/1787548"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2020-0027"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-20T21:04:58Z",
    "nvd_published_at" : null
  }
}