CVE-2025-58356: Github.com/edgelesssys/constellation/v2 Constellation Has Insecure LUKS2 Persistent Vulnerability

HIGH
Advisory Identifier: GHSA-hq76-6gh2-5g4q
CWE-552 CWE-347
Published
Advisory Summary

CVE-2025-58356 is a HIGH constellation has insecure luks2 persistent vulnerability (CWE-552: Files or Directories Accessible to External Parties) affecting Github.com/edgelesssys/constellation/v2 libraries in the Go ecosystem. The issue involves constellation has insecure luks2 persistent storage partitions which may be opened and used. Remediation is available by upgrading affected packages to version 2.24.0.

CVE-2025-58356 at a Glance

CVE Identifier CVE-2025-58356
GHSA Identifier GHSA-hq76-6gh2-5g4q
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-552: Files or Directories Accessible to External Parties
Affected Product Github.com/edgelesssys/constellation/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-58356

To remediate this vulnerability, upgrade all affected Github.com/edgelesssys/constellation/v2 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/constellation/v2 fixed: 2.24.0
Upgrade github.com/edgelesssys/constellation/v2 to 2.24.0
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/constellation/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-58356, inspect your project dependencies for Github.com/edgelesssys/constellation/v2:

inspect dependencies for github.com/edgelesssys/constellation/v2

Analyze the terminal output to locate any version of Github.com/edgelesssys/constellation/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.24.0), 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/constellation/v2, 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 confidential computing guest that is using the [OpenCryptDevice](https://github.com/edgelesssys/constellation/blob/6eff250f16f8ae48221d412550e4a64a4bf0d77b/csi/cryptmapper/cryptmapper.go#L89) feature. The guest will open the volume and write secret data using a volume key known to the attacker. The attacker can also pre-load data on the device, which could potentially compromise guest execution. LUKS2 volume metadata is not authenticated and 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) - Contains arbitrary data chosen by the attacker ### Details The Constellation CVM image uses LUKS2-encrypted volumes for persistent storage. When opening an encrypted storage device, the CVM uses the `libcryptsetup` function [crypt_activate_by_passhrase](https://github.com/martinjungblut/go-cryptsetup/blob/fd0874fd07a6e477f0a4d18f2e80234983afe74f/device.go#L261). If the VM is successful in opening the partition with the disk encryption key, it treats the volume as confidential. 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 A LUKS2 disk encrypted with a master key, which is in turn encrypted with user passwords stored in some number of keyslots. By creating a malicious disk which sets the keyslot encryption algorithm to `”crypto_null-ecb”`, an attacker can construct a disk such that keyslot decryption does not depend in any way on the enclave-held secret data. When a confidential guest opens such a device using `cryptsetup open`, the mapped disk is created without error, and any further writes to the disk are encrypted using an attacker-controlled key. ### Patches To protect against this and similar attacks, Constellation now performs detached reading of LUKS headers. The header is copied into the encrypted memory of the CVM and then verified. The verified header is then used to open the encrypted LUKS device in detached header mode. This was implemented in https://github.com/edgelesssys/constellation/pull/3927 and release as part of [Constellation v2.24.0](https://github.com/edgelesssys/constellation/releases/tag/v2.24.0).

CVE-2025-58356 Affected Github.com/edgelesssys/constellation/v2 Versions

1 component(s)
Fixed Versions:
2.24.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/edgelesssys/constellation/v2
Go
< 2.24.0
2.24.0

References

Frequently Asked Questions

What is CVE-2025-58356?
CVE-2025-58356 is a security vulnerability in Github.com/edgelesssys/constellation/v2 involving Constellation has insecure LUKS2 persistent storage partitions which may be opened and used under CWE-552: Files or Directories Accessible to External Parties.
Which Github.com/edgelesssys/constellation/v2 versions are affected?
Affected versions include releases prior to 2.24.0 across affected packages: github.com/edgelesssys/constellation/v2.
What version fixes CVE-2025-58356?
Upgrading to 2.24.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/edgelesssys/constellation/v2 affected?
Yes, github.com/edgelesssys/constellation/v2 is affected in releases prior to 2.24.0. Upgrade your dependency to 2.24.0 or later.
What CWE is associated with CVE-2025-58356?
CVE-2025-58356 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 CVE-2025-58356?
Run the dependency tree command: 'inspect dependencies for github.com/edgelesssys/constellation/v2'. 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-hq76-6gh2-5g4q",
  "modified" : "2025-12-01T16:06:06Z",
  "published" : "2025-10-27T16:20:25Z",
  "aliases" : [ "CVE-2025-58356" ],
  "summary" : "Constellation has insecure LUKS2 persistent storage partitions which may be opened and used",
  "details" : "### Summary\nA malicious host may provide a crafted LUKS2 volume to a confidential computing guest that is using the [OpenCryptDevice](https://github.com/edgelesssys/constellation/blob/6eff250f16f8ae48221d412550e4a64a4bf0d77b/csi/cryptmapper/cryptmapper.go#L89) feature. The guest will open the volume and write secret data using a volume key known to the attacker. The attacker can also pre-load data on the device, which could potentially compromise guest execution.\n\n\nLUKS2 volume metadata is not authenticated and supports null key-encryption algorithms, allowing an attacker to create a volume such that the volume:\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- Contains arbitrary data chosen by the attacker\n\n\n### Details\nThe Constellation CVM image uses LUKS2-encrypted volumes for persistent storage. When opening an encrypted storage device, the CVM uses the `libcryptsetup`  function [crypt_activate_by_passhrase](https://github.com/martinjungblut/go-cryptsetup/blob/fd0874fd07a6e477f0a4d18f2e80234983afe74f/device.go#L261). If the VM is successful in opening the partition with the disk encryption key, it treats the volume as confidential. 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\nA LUKS2 disk encrypted with a master key, which is in turn encrypted with user passwords stored in some number of keyslots. By creating a malicious disk which sets the keyslot encryption algorithm to `”crypto_null-ecb”`, an attacker can construct a disk such that keyslot decryption does not depend in any way on the enclave-held secret data. When a confidential guest opens such a device using `cryptsetup open`, the mapped disk is created without error, and any further writes to the disk are encrypted using an attacker-controlled key.\n\n### Patches\n\nTo protect against this and similar attacks, Constellation now performs detached reading of LUKS headers. The header is copied into the encrypted memory of the CVM and then verified. The verified header is then used to open the encrypted LUKS device in detached header mode. This was implemented in https://github.com/edgelesssys/constellation/pull/3927 and release as part of [Constellation v2.24.0](https://github.com/edgelesssys/constellation/releases/tag/v2.24.0).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/edgelesssys/constellation/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.24.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.23.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/edgelesssys/constellation/security/advisories/GHSA-hq76-6gh2-5g4q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-58356"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/edgelesssys/constellation/pull/3927"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/edgelesssys/constellation/commit/bb8d2c8a5c0a0a6510d2cc43055be21f4a3ab83c"
  }, {
    "type" : "WEB",
    "url" : "https://blog.trailofbits.com/2025/10/30/vulnerabilities-in-luks2-disk-encryption-for-confidential-vms"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/edgelesssys/constellation"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/edgelesssys/constellation/releases/tag/v2.24.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347", "CWE-552" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-27T16:20:25Z",
    "nvd_published_at" : "2025-10-27T20:15:53Z"
  }
}