CVE-2025-54471: NeuVector is shipping cryptographic material into its binary
6.5
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/neuvector/neuvector | go | >= 5.3.0, <= 5.4.6 | 5.4.7 |
| github.com/neuvector/neuvector | go | >= 0.0.0-20230727023453-1c4957d53911, < 0.0.0-20251020133207-084a437033b4 | 0.0.0-20251020133207-084a437033b4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability, identified as GH-SA-h773-7gf7-9m2x, stems from NeuVector's use of a hard-coded cryptographic key for encrypting sensitive configurations and user tokens. My analysis of the provided patch commit 084a437033b491eeea11bdba1a09dd84ed12ea88 confirms this. The core of the issue lies in functions that performed encryption and decryption using a static, predictable key.
The patch introduces a new, more secure method of handling encryption keys by dynamically generating them and storing them in Kubernetes secrets. The new implementation uses AES-GCM, a modern and secure encryption algorithm.
I have identified the following key functions as vulnerable because they were either directly using the hardcoded key or were responsible for orchestrating the vulnerable encryption/decryption process:
common.(*EncryptMarshaller).Marshal: This function and its internal helpers were responsible for encrypting configuration data before persisting it. The patch reveals that it would fall back to usingutils.EncryptPassword, the old method that relied on the hardcoded key.common.(*DecryptUnmarshaller).UnmarshalandUncloak: These functions were responsible for decrypting configuration data. The patch explicitly shows logic to handle data encrypted with the old method (utils.DecryptPassword), proving the existence and use of the weak encryption.utils.EncryptUserTokenandutils.DecryptUserToken: These functions were specifically used for handling user authentication tokens. The code changes clearly show the removal of a call togetPasswordSymKey(), which is where the hardcoded key was likely sourced from.
These functions would be the primary indicators in a runtime profile if the vulnerability were to be triggered. For example, during login or when sensitive configuration is saved or loaded, these functions would be on the call stack. The patch mitigates the vulnerability by replacing the static key with a dynamic key management system, significantly improving the security of the stored data.
Vulnerable functions
github.com/neuvector/neuvector/controller/common.(*EncryptMarshaller).Marshalcontroller/common/marshal.go
github.com/neuvector/neuvector/controller/common.(*DecryptUnmarshaller).Unmarshalcontroller/common/marshal.go