GHSA-f5p4-p5q5-jv3h: Github.com/edgelesssys/contrast Contrast Has Insecure LUKS2 Persistent Vulnerability

MODERATE
CVSS 5.7
CWE-552 CWE-347
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-f5p4-p5q5-jv3h
Severity MODERATE
CVSS v3.1 Base Score 5.7
CWE Classification CWE-552: Files or Directories Accessible to External Parties
Affected Product Github.com/edgelesssys/contrast
Package Ecosystem Go
Published Date
Last Updated

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

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

github.com/edgelesssys/contrast fixed: 1.12.1
Upgrade github.com/edgelesssys/contrast to 1.12.1
Verify Direct and Transitive Dependencies

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

### Summary A 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. 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. ### Patches A 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). 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](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). In 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).

GHSA-f5p4-p5q5-jv3h Affected Github.com/edgelesssys/contrast Versions

1 component(s)
Fixed Versions:
1.12.1
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?
GHSA-f5p4-p5q5-jv3h is a security vulnerability in Github.com/edgelesssys/contrast involving Contrast has insecure LUKS2 persistent storage partitions may be opened and used under CWE-552: Files or Directories Accessible to External Parties.
Which Github.com/edgelesssys/contrast versions are affected?
Affected versions include releases prior to 1.12.1 across affected packages: github.com/edgelesssys/contrast.
What version fixes GHSA-f5p4-p5q5-jv3h?
Upgrading to 1.12.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/edgelesssys/contrast affected?
Yes, github.com/edgelesssys/contrast is affected in releases prior to 1.12.1. Upgrade your dependency to 1.12.1 or later.
What is the CVSS score of GHSA-f5p4-p5q5-jv3h?
GHSA-f5p4-p5q5-jv3h has a CVSS v3.1 base score of 5.7 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-f5p4-p5q5-jv3h?
GHSA-f5p4-p5q5-jv3h is classified under CWE-552: Files or Directories Accessible to External Parties (The product makes files or directories accessible to unauthorized actors, even though they should not be.).
How can I check Go dependencies for GHSA-f5p4-p5q5-jv3h?
Run the dependency tree command: 'inspect dependencies for github.com/edgelesssys/contrast'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}