GHSA-f5p4-p5q5-jv3h: Github.com/edgelesssys/contrast Contrast Has Insecure LUKS2 Persistent Vulnerability
MODERATEGHSA-f5p4-p5q5-jv3h is a MODERATE (CVSS 5.7) contrast has insecure luks2 persistent vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Github.com/edgelesssys/contrast libraries in the Go ecosystem. The issue involves contrast has insecure luks2 persistent storage partitions may be opened and used. Remediation is available by upgrading affected packages to version 1.12.1.
GHSA-f5p4-p5q5-jv3h at a Glance
Security Impact
CVSS: 5.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-f5p4-p5q5-jv3h
To remediate this vulnerability, upgrade all affected Github.com/edgelesssys/contrast dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/edgelesssys/contrast to 1.12.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/edgelesssys/contrast
How to Check if You Are Affected
To determine whether your application is affected by GHSA-f5p4-p5q5-jv3h, inspect your project dependencies for Github.com/edgelesssys/contrast:
inspect dependencies for github.com/edgelesssys/contrast
Analyze the terminal output to locate any version of Github.com/edgelesssys/contrast in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-552: Files or Directories Accessible to External Parties, where the product makes files or directories accessible to unauthorized actors, even though they should not be. In Github.com/edgelesssys/contrast, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-f5p4-p5q5-jv3h Affected Github.com/edgelesssys/contrast Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/edgelesssys/contrast
|
Go |
< 1.12.1
|
1.12.1
|
References
Frequently Asked Questions
What is GHSA-f5p4-p5q5-jv3h?
Which Github.com/edgelesssys/contrast versions are affected?
What version fixes GHSA-f5p4-p5q5-jv3h?
Is github.com/edgelesssys/contrast affected?
What is the CVSS score of GHSA-f5p4-p5q5-jv3h?
What CWE is associated with GHSA-f5p4-p5q5-jv3h?
How can I check Go dependencies for GHSA-f5p4-p5q5-jv3h?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f5p4-p5q5-jv3h",
"modified" : "2025-11-05T22:11:22Z",
"published" : "2025-10-28T17:49:59Z",
"aliases" : [ ],
"summary" : "Contrast has insecure LUKS2 persistent storage partitions may be opened and used",
"details" : "### Summary\n\nA malicious host may provide a crafted LUKS2 volume to a Contrast pod VM that uses the [secure persistent volume](https://docs.edgeless.systems/contrast/howto/encrypted-storage) feature. The guest will open the volume and write secret data using a volume key known to the attacker. \n\nLUKS2 volume metadata is (a) not authenticated and (b) supports null key-encryption algorithms, allowing an attacker to create a volume such that the volume:\n\n- Opens (cryptsetup open) without error using any passphrase or token\n- Records all writes in plaintext (or ciphertext with an attacker-known key)\n\n### Details\n\nContrast 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.\n\nCryptsetup 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.\n\n### Impact\n\nUsing 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.\n\nNotice that Contrast's persistent volumes weren't integrity protected, so the integrity impact of this attack isn't considered.\n\n### Patches\n\nA partial fix landed in [cryptsetup version 2.8.1](https://gitlab.com/cryptsetup/cryptsetup/-/blob/main/docs/v2.8.1-ReleaseNotes#L14), 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](https://github.com/edgelesssys/contrast/releases/tag/v1.12.1).\n\nHowever, 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](https://github.com/edgelesssys/contrast/pull/1731) and released as part of [Contrast v1.13.0](https://github.com/edgelesssys/contrast/releases/tag/v1.13.0).\n\nIn addition, we added integrity protection for secure persistent storage as a new feature in [#1734](https://github.com/edgelesssys/contrast/pull/1734), which was also shipped as part of [v1.13.0](https://github.com/edgelesssys/contrast/releases/tag/v1.13.0).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/edgelesssys/contrast"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.12.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.12.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/security/advisories/GHSA-f5p4-p5q5-jv3h"
}, {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/pull/1731"
}, {
"type" : "WEB",
"url" : "https://github.com/edgelesssys/contrast/commit/2252a231d570c2dce10a33660452b0bfc3c43958"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/edgelesssys/contrast"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-4078"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347", "CWE-552" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-28T17:49:59Z",
"nvd_published_at" : null
}
}