Red Hat
Rpm: command execution via macro expansion in `rpmuncompress -x` for crafted `.gem` filenames
A flaw was found in rpm. A local attacker could supply a specially crafted `.gem` filename containing RPM macro syntax. When a user or automated workflow invokes `rpmuncompress -x` on this file, the macro expansion occurs during command construction. This allows the attacker to execute arbitrary commands with the privileges of the invoking account, leading to a compromise of confidentiality, integrity, and availability.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
Fixed in 0:4.19.1.1-29.el10_3
Fixed in 0:4.19.1.1-23.el10_2.3
Fixed in 6.1.0-1.hum1
Mitigation
Upgrade Red Hat Enterprise Linux 10 to 0:4.19.1.1-29.el10_3 or later.
Upgrade Red Hat Enterprise Linux 10.2 Extended Update Support to 0:4.19.1.1-23.el10_2.3 or later.
Upgrade Red Hat Hardened Images to 6.1.0-1.hum1 or later.
Workaround
To mitigate this vulnerability, avoid using `rpmuncompress -x` (or a build workflow that invokes it via %{__rpmuncompress}) on `.gem` files from untrusted sources. Before extraction, rename `.gem` files to remove any RPM macro syntax (e.g., `%(...)`) or utilize an alternative extraction tool that does not expand RPM macros in filenames. In automated environments, implement validation to reject or sanitize untrusted archive names prior to processing
References
- Vendor advisory access.redhat.com/errata/RHSA-2026:100638
- Vendor advisory access.redhat.com/errata/RHSA-2026:66637
- Vendor advisory access.redhat.com/errata/RHSA-2026:99595
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.