A vulnerability in Linux kernels, known as usb2shell, facilitates unauthorized root access when a harmful USB device is connected. This flaw, registered as CVE-2026-98232, allows the execution of commands with root privileges, posing a significant risk, especially for systems with accessible USB ports.
Understanding the usb2shell Vulnerability
Discovered by Drivesec researchers Z3r0n37 and Alberto247, usb2shell exploits a flaw in the automatic scanning process of the Linux kernel when a new USB storage device is detected. This vulnerability does not require user interaction, such as file opening or device mounting, but does necessitate physical access to the USB port.
This security gap is particularly troubling for systems like kiosks, payment terminals, EV chargers, and industrial panels running Linux, where USB ports might be exposed to public access. Unlike some previous threats, usb2shell targets the kernel itself, bypassing the need for disabling automatic mounting, which would not mitigate the risk.
Technical Insights on the Exploit
The usb2shell exploit resides in the SCSI storage code of Linux and was introduced with Linux 6.5’s Command Duration Limits feature. During the scanning process, the kernel fails to adequately verify certain data lengths reported by the USB device, risking memory exposure and buffer overflow.
The researchers demonstrated the vulnerability using a standard Debian kernel, achieving root execution despite the presence of memory layout protection. Although attempts to exploit the vulnerability may not always succeed immediately, successful execution poses a serious threat without requiring prior user credentials.
Mitigation and Future Outlook
Usb2shell affects Linux kernels from version 6.5 onward. To mitigate this risk, systems should be updated to the latest kernel versions where the vulnerability has been addressed. Drivesec has identified specific kernel versions that incorporate the necessary patches.
Administrators should validate their systems against their vendor’s advisories, as fixes may be backported to older kernel versions. For systems where patching is delayed, preventing the loading of usb-storage and uas drivers is recommended, alongside utilizing USBGuard to control device access.
While USB threats are not new, usb2shell underscores the need for robust security measures around USB device management, particularly in publicly accessible environments. As the landscape of cybersecurity threats evolves, staying informed and proactive is crucial in safeguarding systems.
