CVE-2018-6558: Privilege Escalation in fscrypt

github.com/google/fscrypt Updated 02 Oct 2025

Summary

14/04/2021
Yes i
Moderate
6.5

CVE-2018-6558: Privilege escalation in github.com/google/fscrypt. Affects github.com/google/fscrypt versions < 0.2.4. Fixed in 0.2.4. How to fix ↓

Also tracked for

The same CVE-2018-6558 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The fscrypt package is a Go library that provides support for file system encryption on Linux. It is used by applications to encrypt and decrypt files using the Linux kernel's fscrypt API. This vulnerability affects versions of fscrypt before 0.2.4. The package is vulnerable to a privilege escalation attack through the pam_fscrypt module, which is used by certain applications that utilize Linux-PAM for authentication.

Vulnerability Detail

The pam_fscrypt module in fscrypt before 0.2.4 incorrectly restores primary and supplementary group IDs to the values associated with the root user. This allows attackers to gain elevated privileges by successfully logging in through specific applications that use Linux-PAM. By exploiting this vulnerability, an attacker can bypass access controls and perform unauthorized actions with elevated privileges. The impact of this vulnerability can be severe, as it allows an attacker to gain full control over the affected system.

How To Fix

Latest published version: v0.3.7 as of 22 Oct 2026

go get github.com/google/fscrypt@v0.3.7

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.2.4

This is the first release that contains the fix.

go get github.com/google/fscrypt@v0.2.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update the fscrypt package to the fixed version to mitigate the risk of privilege escalation.

Conclusion

The privilege escalation vulnerability in fscrypt before version 0.2.4 can allow attackers to gain elevated privileges on the affected system. It is crucial to update the fscrypt package to the fixed version to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/google/fscrypt →

Share this vulnerability

FAQ

This vulnerability allows attackers to gain elevated privileges on the affected system, potentially leading to unauthorized access and control over sensitive data.

Versions of fscrypt before 0.2.4 are affected by this vulnerability.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. It analyzes your Gopkg.lock file and provides real-time alerts for open-source vulnerabilities.

Yes, updating the fscrypt package to version 0.2.4 or later will fix this vulnerability.

There are no known workarounds for this vulnerability. Updating the fscrypt package is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/google/fscrypt.

How To Fix

Latest published version: v0.3.7 as of 22 Oct 2026

go get github.com/google/fscrypt@v0.3.7

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.2.4

This is the first release that contains the fix.

go get github.com/google/fscrypt@v0.2.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback