USB2Shell (CVE-2026-98232): A Trapped USB Drive Is Enough to Get Root on Linux
USB2Shell is the name of a vulnerability discovered in the Linux kernel that allows a malicious USB device to execute a command as root, even when no user is logged in. All kernels from version 6.5 onward are affected, as long as the patch has not been installed. Here is what you need to know.
This week, the Italian company Drivesec revealed the security flaw CVE-2026-98232, a.k.a. USB2Shell (apparently 2Shell-style names are all the rage). This vulnerability sits in the Linux kernel's SCSI layer, which handles USB storage media among other things. The researchers managed to build a full exploit chain on a real machine.
Drivesec presents USB2Shell as the “physical” counterpart to the remotely exploitable “2Shell” and “4Shell” flaws that have followed one another over the past few months. Here, no network access is needed: you just have to plug something into the vulnerable machine.
In fact, Drivesec is not the only one to have spotted this weakness in the Linux kernel. This has also become a real trend recently. The first report came from Sashiko, an open source AI code review system developed by Google and handed over to the Linux Foundation this year. According to Google, Sashiko is credited in 528 disclosed and patched Linux kernel CVEs in 2026.
USB2Shell: A Flaw Triggered Before Login Even Starts
It all starts with CDL support (a feature that lets you set a maximum duration for commands sent to a disk), added in Linux 6.5. The flaw is reachable through USB storage drivers, which rely on this SCSI layer: when a device identifies itself as a CDL-compatible ATA disk, the kernel calls scsi_cdl_enable() during hardware auto-detection. This function copies a configuration page supplied by the device into a 64-byte stack buffer, then sends it back.
The problem is that the lengths announced by the device are not checked. The length calculation can overflow, and a pointer can end up past the buffer. The result: the USB-connected device can read up to 64 bytes from the kernel stack and modify one byte of that stack, at a position it chooses.
Most importantly, all of this happens before the system even presents the first disk to the user. That means session locking is inactive, as is any policy that blocks USB drive mounting: the flaw is exploited before those protections can kick in.
On paper, one byte is nothing. And yet it was enough for the Drivesec researchers to gain full control of the machine. The exploit they developed bypasses KASLR. It then forges fake structures in memory so that modifying a single byte lets it write wherever it wants in the kernel. When the device is unplugged, the kernel executes the command provided by the attacker, with root privileges.
The demonstration was carried out with a Cynthion (a programmable USB tool) connected to a PC running Debian kernel 6.12.22+bpo-amd64, with KASLR enabled. The exploitation is not 100% reliable: in the video published by the researchers, the first two attempts fail and the third runs whoami and uname as root. However, a failed attempt does not crash the system, which makes retries possible.

Which Machines Are Exposed?
Three conditions must be met for a machine to be vulnerable:
- Linux kernel 6.5 or later: without the patch.
- USB storage support: via the
usb-storageoruasdrivers, built into the kernel or loaded automatically. - An accessible USB port: the attacker needs physical access.
What is especially concerning are Linux-based devices with a publicly accessible USB port, from payment terminals to EV charging stations, self-service kiosks, car infotainment screens, in-flight entertainment systems, home automation boxes, and more. To date, none of these devices has been shown to be compromised.
And Android? Kernels 6.6 and newer are affected, but only by the memory leak. On the versions tested (Google's generic GKI kernel and the Samsung Galaxy A16 kernel), bounds checks added at compile time prevent writes past the buffer.
How to Protect Yourself from USB2Shell
The fix was merged into the kernel on September 9, 2026, and the CVE was published on October 6 by the Linux kernel CVE team. It is present in the following versions:
- 6.6 branch: starting with version 6.6.158.
- 6.12 branch: starting with version 6.12.112.
- 6.18 branch: starting with version 6.18.54.
- 7.2 branch: starting with version 7.2.8.
- Mainline: starting with Linux 7.3.
In its bulletin, the Linux kernel CVE team recommends moving to the latest stable release rather than integrating this single fix. Be careful, though: distributions backport patches without necessarily changing the version number, so their security advisories are what matter, not the kernel version number. Here is the status of the main ones:
- Debian: Debian 12's 6.1 kernel is not affected, according to Debian's security tracker. Debian 13 has been fixed since version 6.12.113-1, and the 6.12 kernel offered for Debian 12 since version 6.12.113-1~deb12u1.
- Ubuntu: Ubuntu 22.04 LTS's standard kernel is not affected. Ubuntu 24.04 LTS is fixed with kernel 6.8.0-149.149 and Ubuntu 26.04 LTS with kernel 7.0.0-42.42.
- Red Hat: as of this writing, the CVE entry does not yet detail the status of the different RHEL versions.
If you cannot update right away, Drivesec recommends two workarounds:
- Avoid USB storage where it is unnecessary: do not build or do not auto-load the
usb-storageanduasdrivers. - Filter USB devices: with an allowlist, via USBGuard or the
authorized_default=0setting, the kernel no longer enumerates unauthorized devices.
For now, no in-the-wild exploitation has been reported.

