CVE-2026-16313: Sg3_utils: sg3_utils: arbitrary command execution via udev property injection in sg_inq --export

Published Jul 20, 2026
·
Updated

A flaw was found in sg3utils. The sginq 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.

Other sources

sg3utils v1.34 through v1.48 contains a command injection flaw in exportdevids() in src/sginq.c. The sginq --export command outputs SCSI device identification data from VPD page 0x83 in KEY=VALUE format for udev import. The SCSI name string field (designator type 8, line 2046) and the ATA subfield (line 1922) are printed with printf("%.s") without sanitizing control characters. A newline embedded in a device-controlled name string splits a single property into two lines, allowing injection of arbitrary udev properties including REMOVECMD. Combined with the default udev rule in 50-udev-default.rules that executes REMOVECMD on device removal, this enables arbitrary root command execution when a crafted SCSI device is disconnected. CWE-93. Introduced in commit c410806c (2012-02-23). Fixed upstream in PR #83.

— Red Hat

Sg3utils: sg3utils: arbitrary command execution via udev property injection in sginq --export

— Microsoft

Affected Software

6 affected componentsFixes available
sg3_utils sg3_utils>=1.34<=1.48
debian/sg3-utils<=1.46-3, <=1.48-3~deb13u1
1.48-4
debian/sg3-utils*
debian/sg3-utils*
debian/sg3-utils<1.48-4
1.48-4
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/sg3-utils to a version that resolves this vulnerability.

    Fixed in 1.48-4
  2. Upgrade

    Upgrade sg3_utils to a version that resolves this vulnerability.

    Patch PR #83

Event History

Jul 20, 2026
Data Sourced
via Red Hat·03:44 PM
DescriptionSeverityAffected Software
Jul 28, 2026
CVE Published
via MITRE·04:47 PM
Data Sourced
via MITRE·04:47 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·05:16 PM
DescriptionSeverityAffected Software
Aug 7, 2026
Data Sourced
via Microsoft·07:57 AM
DescriptionSeverityWeakness
Oct 21, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-16313?

The severity of CVE-2026-16313 is classified as high, with a score of 7.6.

2

What type of vulnerability is CVE-2026-16313?

CVE-2026-16313 is a CRLF Injection vulnerability that allows for arbitrary command execution.

3

How does CVE-2026-16313 exploit occur?

The exploit occurs through the sg_inq command when it outputs device identification data containing unsanitized control characters.

4

How do I fix CVE-2026-16313?

To fix CVE-2026-16313, users should apply the latest updates to sg3_utils that address the udev property injection issue.

5

What impact does CVE-2026-16313 have on system security?

CVE-2026-16313 can lead to arbitrary command execution, allowing attackers to manipulate system properties and potentially compromise security.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203