GHSA-F5P4-P5Q5-JV3H

GHSA-F5P4-P5Q5-JV3H is a medium-severity security vulnerability in github.com/edgelesssys/contrast (go), affecting versions <= 1.12.0. It is fixed in 1.12.1.

Summary

A malicious host may provide a crafted LUKS2 volume to a Contrast pod VM that uses the secure persistent volume feature. The guest will open the volume and write secret data using a volume key known to the attacker.

LUKS2 volume metadata is (a) not authenticated and (b) supports null key-encryption algorithms, allowing an attacker to create a volume such that the volume:

  • Opens (cryptsetup open) without error using any passphrase or token
  • Records all writes in plaintext (or ciphertext with an attacker-known key)

Details

Contrast uses cryptsetup to setup secure persistent volumes, using the secret seed as key for the cryptsetup encryption. To do so the Contrast Initializer will invoke the cryptsetup CLI. If the device provided by Kubernetes is a identified as cryptsetup device, the Initializer assumes a pod restart happened and the device was previously encrypted with the secret seed. The Initializer will try to open the device, and assume it is protected if the operation succeeds. However, due to the unsafe handling of null keyslot algorithms in the cryptsetup 2.8.1, it is possible that the opened volume is not encrypted at all.

Cryptsetup prior to version 2.8.1 does not report an error when processing LUKS2-formatted disks that use the cipher_null-ecb algorithm in the keyslot encryption field.

Impact

Using a maliciously crafted cryptsetup device, an attacker can read confidential data that was written to the persistent volume that should have been protected by encryption.

Notice that Contrast's persistent volumes weren't integrity protected, so the integrity impact of this attack isn't considered.

GHSA-F5P4-P5Q5-JV3H has a CVSS score of 5.7 (Medium). The vector is reachable from an adjacent network, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.12.1); upgrading removes the vulnerable code path.

Affected versions

github.com/edgelesssys/contrast (<= 1.12.0)

Security releases

github.com/edgelesssys/contrast → 1.12.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

A partial fix landed in cryptsetup version 2.8.1, disabling null ciphers in keyslots when the user passphrase is nonempty. Contrast shipped this cryptsetup version shortly after it has been released upstream, in Contrast version v1.12.1.

However, LUKS header parsing and interpretation remains a large attack surface. Attackers may still be able to modify LUKS headers in other ways, such as triggering automatic reencryption or downgrading to weak ciphers. As a long term hardening solution, LUKS disks is encrypted in detached header mode. The detached header resides in a tmpfs file inside guest RAM, and is checked before it is used to open the device. This has been implemented in #1731 and released as part of Contrast v1.13.0.

In addition, we added integrity protection for secure persistent storage as a new feature in #1734, which was also shipped as part of v1.13.0.

Frequently Asked Questions

  1. What is GHSA-F5P4-P5Q5-JV3H? GHSA-F5P4-P5Q5-JV3H is a medium-severity security vulnerability in github.com/edgelesssys/contrast (go), affecting versions <= 1.12.0. It is fixed in 1.12.1.
  2. How severe is GHSA-F5P4-P5Q5-JV3H? GHSA-F5P4-P5Q5-JV3H has a CVSS score of 5.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/edgelesssys/contrast are affected by GHSA-F5P4-P5Q5-JV3H? github.com/edgelesssys/contrast (go) versions <= 1.12.0 is affected.
  4. Is there a fix for GHSA-F5P4-P5Q5-JV3H? Yes. GHSA-F5P4-P5Q5-JV3H is fixed in 1.12.1. Upgrade to this version or later.
  5. Is GHSA-F5P4-P5Q5-JV3H exploitable, and should I be worried? Whether GHSA-F5P4-P5Q5-JV3H is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-F5P4-P5Q5-JV3H is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-F5P4-P5Q5-JV3H? Upgrade github.com/edgelesssys/contrast to 1.12.1 or later.

Other vulnerabilities in github.com/edgelesssys/contrast

Stop the waste.
Protect your environment with Kodem.