CVE-2021-4122
NixOS vulnerability analysis and mitigation

Overview

CVE-2021-4122 is a security vulnerability discovered in cryptsetup's LUKS (Linux Unified Key Setup) encryption system. The vulnerability, disclosed in January 2022, allows an attacker with physical access to trick cryptsetup into disabling encryption during device recovery. This flaw affects cryptsetup versions from 2.2.0 onwards, while versions 1.x, 2.0.x, and 2.1.x are not affected as they lack LUKS2 reencryption extension support (NVD, Debian).

Technical details

The vulnerability exists in the LUKS2 online reencryption extension crash recovery mechanism. An attacker can modify on-disk metadata to simulate decryption in progress with crashed reencryption step, leading to permanent data decryption on part of the LUKS device. With default parameters (16 MiB LUKS2 header) and one allocated keyslot, the maximal decrypted size can exceed 3GiB. The attack doesn't require knowledge of user passphrases but needs physical access to the encrypted device (Release Notes).

Impact

The vulnerability allows an attacker with physical access to force permanent decryption of data on encrypted devices. The attack can be reversed afterward, allowing modification of revealed plaintext, and can be executed without leaving visible warnings to users except through the luksDump command. The decryption occurs when a legitimate user activates the device with a correct passphrase (Hacker News).

Mitigation and workarounds

The vulnerability was fixed in cryptsetup versions 2.4.3 and 2.3.7. The fix introduces additional digest protection of reencryption metadata, calculated from known keys and critical reencryption metadata. This prevents attackers from creating correct metadata digest without knowledge of a passphrase for used keyslots. Users must upgrade to these versions or later to protect against this vulnerability (Release Notes).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61619HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61618HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61617HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61610HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025
CVE-2025-61609HIGH7.5
  • NixOSNixOS
  • android
NoNoDec 01, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management