# CVE-2026-16313: sg3_utils command injection via udev property injection in sg_inq

Source: https://junglewise.ai/threats/cve-2026-16313-sg3-utils-command-injection-via-udev-property-injection-in-sg-inq  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-28. Updated: 2026-07-28  
License: CC BY 4.0 with a link back

CVE-2026-16313 · Severity: high · CVSS 7.6 · Published 2026-07-28

A security vulnerability exists in sg3_utils, a set of utilities for interacting with storage devices. When a specially crafted storage device is plugged into a Linux system, it can provide a malicious name containing hidden characters that trick the system's device manager. This allows an attacker with physical access to the machine to execute unauthorized commands with the highest system privileges (root) when the device is later unplugged.

## Quick answers

**Is CVE-2026-16313 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-16313 being exploited in the wild.

**How severe is CVE-2026-16313?** High severity, with a CVSS score of 7.6, published 28 July 2026.

**Which products and versions are affected?** Doug Gilbert Sg3 Utils 1.34 through 1.48.

**Is there a fix for CVE-2026-16313?** A patch was published on 2026-06-06: Fix submitted via upstream Pull Request #83 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-16313 attacked?** It is attacked with physical access, in a software library.

**Am I affected by CVE-2026-16313?** Check whether you run Doug Gilbert Sg3 Utils at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A CRLF injection vulnerability (CWE-93) exists in the export_dev_ids() function within src/sg_inq.c of sg3_utils. When the 'sg_inq --export' command processes SCSI device identification data from VPD page 0x83, it fails to sanitize control characters in the SCSI name string and ATA subfields. An attacker presenting a crafted SCSI device can embed a newline character in these strings to inject arbitrary properties into the udev database, such as 'REMOVE_CMD'. Because default udev rules often execute 'REMOVE_CMD' when a device is removed, this enables arbitrary command execution as root. The flaw was introduced in commit c410806c and fixed in upstream PR #83.

## Affected products

- doug-gilbert sg3_utils 1.34 through 1.48
- Red Hat Red Hat Enterprise Linux 7
- Red Hat Red Hat Enterprise Linux 8
- Red Hat Red Hat Enterprise Linux 9
- Red Hat Red Hat Enterprise Linux 10

## Timeline

- 2012-02-23: other: Vulnerability introduced in commit c410806c
- 2026-06-06: patched: Fix submitted via upstream Pull Request #83
- 2026-07-20: disclosed: Reported to Red Hat Bugzilla
- 2026-07-28: advisory: CVE published to NVD

## References

- [https://access.redhat.com/downloads/content/package-browser/](https://access.redhat.com/downloads/content/package-browser/)
- [https://access.redhat.com/security/cve/CVE-2026-16313](https://access.redhat.com/security/cve/CVE-2026-16313)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2502845](https://bugzilla.redhat.com/show_bug.cgi?id=2502845)
- [https://github.com/doug-gilbert/sg3_utils/pull/83](https://github.com/doug-gilbert/sg3_utils/pull/83)
