CVE-2026-16313
Public on
Last Modified:
Description
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.
Statement
sg3_utils versions 1.34 through 1.48 contain a command injection flaw in the export_dev_ids() function of sg_inq. When sg_inq --export processes SCSI device identification data from VPD page 0x83, the SCSI name string designator (type 8) and the ATA vendor-ID subfield are printed without sanitizing embedded control characters. A crafted SCSI/USB device can embed a newline in this field, splitting sg_inq's udev KEY=VALUE output into two lines and injecting an arbitrary udev property, including REMOVE_CMD. On systems whose default udev rules invoke sg_inq --export for SCSI device identification and act on REMOVE_CMD when a device is removed, this allows a local attacker with physical access to a USB/SCSI port to achieve arbitrary command execution as root simply by disconnecting the crafted device.
Exploitation requires physical access to attach the malicious device, consistent with Red Hat's Physical (AV:P) attack vector scoring. The upstream fix (udev-conforming character escaping for this field) has not yet been included in any tagged sg3_utils release; all Red Hat-shipped versions of sg3_utils in the 1.34-1.48 range are affected.
Mitigation
Remove or comment out the REMOVE_CMD rule from 50-udev-default.rules to prevent command execution on device removal. Alternatively, if automatic SCSI device identification is not required, disable the udev rule that invokes sg_inq --export on device connection.
Additional information
- This content is not included.Bugzilla 2502845: sg3_utils: sg3_utils: arbitrary command execution via udev property injection in sg_inq --export
- Content from cwe.mitre.org is not included.CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Packages and Issued Red Hat Security Errata
Unless explicitly stated as not affected, all previous versions of packages in any minor update stream of a product listed here should be assumed vulnerable, although may not have been subject to full analysis.
| Products / Services | Components | State | Errata |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | sg3_utils | Fixed | RHSA-2026:50142 |
| Red Hat Enterprise Linux 8 | sg3_utils | Fixed | RHSA-2026:56130 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | sg3_utils | Fixed | RHSA-2026:59555 |
| Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | sg3_utils | Fixed | RHSA-2026:59555 |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | sg3_utils | Fixed | RHSA-2026:59567 |
| Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On | sg3_utils | Fixed | RHSA-2026:59567 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | sg3_utils | Fixed | RHSA-2026:59568 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | sg3_utils | Fixed | RHSA-2026:59568 |
| Red Hat Enterprise Linux 9 | sg3_utils | Fixed | RHSA-2026:50141 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | sg3_utils | Fixed | RHSA-2026:61261 |
| No matching records found | |||
Common Vulnerability Scoring System (CVSS) Score Details
Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authorities (CNA) source for its products and services (see Red Hat classifications ).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| CVSS v3 Base Score | 7.6 | N/A | 7.6 |
| Attack Vector | Physical | N/A | Physical |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | None | N/A | None |
| Scope | Changed | N/A | Changed |
| Confidentiality Impact | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
CVSS v3 Vector
Red Hat CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cve.org CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Acknowledgements
Upstream acknowledges Shaomin Chen as the original reporter.
Frequently Asked Questions
Why is Red Hat's CVSS v3 score or Impact different from other vendors?
For more information, see https://access.redhat.com/solutions/762393.
My product is listed as "Under investigation" or "Affected", when will Red Hat release a fix for this vulnerability?
- "Under investigation" doesn't necessarily mean that the product is affected by this vulnerability. It only means that our Analysis Team is still working on determining whether the product is affected and how it is affected.
- "Affected" means that our Analysis Team has determined that this product is affected by this vulnerability and might release a fix to address this in the near future.
What can I do if my product is listed as "Will not fix"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Upgrade to a supported product version that includes a fix for this vulnerability (recommended).
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
What can I do if my product is listed as "Fix deferred"?
Available options depend mostly on the Impact of the vulnerability and the current Life Cycle phase of your product. Overall, you have the following options:
- Apply a mitigation (if one exists).
- Open a This content is not included.support case to request a prioritization of releasing a fix for this vulnerability.
- Red Hat Engineering focuses on addressing high-priority issues based on their complexity or limited lifecycle support. Therefore, lower-priority issues will not receive immediate fixes.
What is a mitigation?
I have a Red Hat product but it is not in the above list, is it affected?
Why is my security scanner reporting my product as vulnerable to this vulnerability even though my product version is fixed or not affected?
My product is listed as "Out of Support Scope". What does this mean?
Not sure what something means? Check out our Security Glossary.