Critical Vulnerability in cryptsetup: Disabling Encryption via Malicious LUKS Header

cryptsetup Updated 02 Oct 2025

Summary

24/08/2022
N/A
Yes i
Medium
4.3

ALPINE-CVE-2021-4122: It was found that a specially crafted LUKS header could trick cryptsetup into disabling encryption during the recovery of the device. Affects cryptsetup versions < 2.3.7-r0. Fixed in 2.3.7-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

cryptsetup is a utility used to manage disk encryption using the dm-crypt kernel module. It allows users to create, manage, and access encrypted volumes. This package is crucial for securing sensitive data on storage devices. However, it has been found to have a vulnerability that can be exploited by an attacker with physical access to the device, potentially leading to severe data security issues.

Vulnerability Detail

The vulnerability identified as CVE-2021-4122 arises from a flaw in the handling of specially crafted LUKS headers by cryptsetup. An attacker with physical access to a storage medium can manipulate the LUKS header to trick cryptsetup into disabling encryption during device recovery. This could result in the permanent loss of encryption for the affected medium, exposing sensitive data to unauthorized access. The vulnerability has a CVSS score of 4.3, indicating a moderate severity level.

How To Fix

Minimum fixed version

2.3.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade cryptsetup

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users should ensure that physical access to the storage medium is restricted and monitor for any unauthorized attempts to manipulate the LUKS header. Regularly backing up data and using additional security measures can also help mitigate risks.

Conclusion

The vulnerability in cryptsetup, identified as CVE-2021-4122, poses a significant risk to data security by allowing attackers to disable encryption on storage devices. It is crucial for users to update to the patched versions of the package to mitigate this risk and ensure the integrity of their encrypted data.

See every vulnerability recorded for cryptsetup →

Share this vulnerability

FAQ

CVE-2021-4122 is a vulnerability in the cryptsetup package that allows an attacker with physical access to disable encryption on a storage device by manipulating the LUKS header.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If exploited, this vulnerability can lead to the permanent disabling of encryption on a storage device, exposing sensitive data to unauthorized access.

You can update cryptsetup by running the command 'apk add cryptsetup@<version>' where <version> is the patched version number, such as 2.3.7-r0 or 2.4.3-r0.

If immediate updates are not possible, restrict physical access to the affected storage medium and monitor for any unauthorized access attempts.

Related vulnerabilities

Recent vulnerabilities recorded for cryptsetup.

How To Fix

Minimum fixed version

2.3.7-r0

This is the first release that contains the fix.

sudo apk add --upgrade cryptsetup

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback