CVE-2022-25328: Command injection in github.com/google/fscrypt

github.com/google/fscrypt Updated 02 Oct 2025

Summary

26/02/2022
Yes i
Moderate
5.0

CVE-2022-25328: Command injection in github.com/google/fscrypt. Affects github.com/google/fscrypt versions < 0.3.3. Fixed in 0.3.3. How to fix ↓

Also tracked for

The same CVE-2022-25328 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

github.com/google/fscrypt is a Go package that provides a command-line interface for managing Linux filesystem encryption. It allows users to encrypt and decrypt files and directories using the Linux kernel's fscrypt subsystem. This package is widely used by developers and system administrators to enhance the security of their file systems. However, a vulnerability has been discovered in the bash_completion script of fscrypt, which can lead to command injection and potential privilege escalation under specific circumstances.

Vulnerability Detail

The bash_completion script for fscrypt is susceptible to command injection attacks. This vulnerability arises from the improper handling of crafted mountpoint paths. If a local user can control the mountpoint paths and the system administrator is using the fscrypt bash completion script to complete these paths, the attacker can inject arbitrary commands and potentially escalate their privileges. This vulnerability has a CVSS score of 5.0 (Moderate) and is identified as CVE-2022-25328. It is crucial to upgrade to version 0.3.3 or above to mitigate this issue.

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.3.3

This is the first release that contains the fix.

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

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 upgrade to the fixed version as soon as possible.

Conclusion

In conclusion, the github.com/google/fscrypt package is vulnerable to command injection, which can lead to privilege escalation. It is crucial to upgrade to version 0.3.3 or above to mitigate this issue. For further support on vulnerability remediation, please contact DevNack.com.

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

Share this vulnerability

FAQ

github.com/google/fscrypt is a Go package that provides a command-line interface for managing Linux filesystem encryption.

This vulnerability allows a local user to inject arbitrary commands and potentially escalate their privileges if the system administrator is using the fscrypt bash completion script.

To fix this vulnerability, upgrade the github.com/google/fscrypt package to version 0.3.3 or above.

No, there is no known workaround for this vulnerability. Upgrading to the fixed version is the recommended solution.

The CVSS score of this vulnerability is 5.0 (Moderate).

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.3.3

This is the first release that contains the fix.

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

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