CVE-2026-16313
High · 7.6CVSS
7.6
EPSS
0.3%
Published
Jul 28, 2026
CISA due date
—
Cloudanix analysis
A specially prepared storage device can trick a system tool into running attacker commands with full administrative rights when the device is unplugged.
- Exploitation
- Physical Access
- Attacker needs
- Physical Access
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The sg_inq --export command in sg3_utils fails to sanitize control characters (specifically newlines) present in SCSI device identification strings, allowing those characters to be written directly into the udev device database as property assignments.
Why it matters to the business
An attacker with physical access to attach a malicious SCSI device can trigger arbitrary command execution as root upon device removal, potentially leading to full system compromise without requiring network access or credentials.
How an attack unfolds
An attacker crafts a SCSI device whose inquiry response embeds newline characters inside a device identifier field. When sg_inq --export is later invoked on that device, the unsanitized output is processed by udev, injecting arbitrary property rules. Upon device disconnection, udev executes the injected rules, running attacker-controlled commands with root privileges.
How to fix it
Update sg3_utils to a version that sanitizes control characters in SCSI name fields before writing to udev output. Until a fixed release is available, avoid using the --export option on untrusted devices and restrict physical access to SCSI interfaces.
How to confirm the fix worked
Confirm sg3_utils version is newer than the vulnerable release; test by attaching a device that returns a name containing a newline and verifying that the resulting udev properties do not contain injected assignments.
Typical attack path
- Attacker physically connects a crafted SCSI device whose inquiry data contains embedded newlines in name strings
- System or administrator runs sg_inq --export against the device, producing udev-compatible output that includes the injected properties
- Udev database incorporates the malicious properties without validation
- Attacker disconnects the device, triggering udev rule processing that executes the injected commands as root
How to detect it
Review udev logs and rule application events around the time of SCSI device attach/detach for unexpected property assignments containing newlines or shell metacharacters; correlate with sg_inq process execution in audit logs.
- sg_inq.*--export
- udev.*property.*newline
- scsi inquiry response containing \n
What your security team should do
- Restrict physical access to systems with SCSI interfaces until a patched sg3_utils package is deployed
- Monitor for availability of fixed sg3_utils packages and schedule immediate updates once released
- Audit scripts and services that invoke sg_inq --export and replace or guard them against untrusted devices
The record
A flaw was found in sg3_utils. The sg_inq command, when invoked with the --export option, outputs device identification data without sanitizing control characters in SCSI name string fields. A newline character embedded in a device-supplied name string can inject arbitrary properties into the udev device database. This could allow an attacker who can present a crafted SCSI device to execute arbitrary commands as root when the device is disconnected.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-119560 OPNsense core through 26.7.8 contains a configuration injection vulnerability that allows… CWE-93
- CVE-2026-119424 OPNsense core before 26.7.8 contains a configuration line injection vulnerability that… CWE-93
- CVE-2026-119417 CakePHP 4.5.12, 4.6.5, 5.1.8 through 5.1.10, 5.2.14 through 5.2.15, 5.3.7, and 5.4.0… CWE-93
- CVE-2026-119415 CakePHP through 5.4.3 contains a header injection vulnerability in FormDataPart that… CWE-93
- CVE-2026-115303 The Contact Form by Supsystic WordPress plugin before 1.11.1 does not strip CR/LF… CWE-93
- CVE-2026-118371 LibreSSL through 4.4.0 contains a CRLF injection vulnerability in the libcrypto… CWE-93
- CVE-2026-118372 LibreSSL ocspcheck through 4.4.0 contains a CRLF injection vulnerability that allows… CWE-93
- CVE-2026-115785 An SMTP command injection vulnerability in the data-source testing functionality of… CWE-93