CVE-2022-25328: Command injection in github.com/google/fscrypt
Summary
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
- fscrypt · Debian:11
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.
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.
No signup required · Results in about 60 seconds
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 →
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).
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/google/fscrypt.