Red Hat
Rpm: rpmbuild gettarspec() crafted tar member name → macro injection
A vulnerability was found in RPM's rpmbuild tarball processing. When processing a crafted source archive, the getTarSpec() function in tools/rpmbuild.cc passes an attacker-controlled tar archive member name to rpmExpand() as part of a %{basename:...} macro expression. A specially crafted .spec member name can therefore inject RPM macros, including Lua expressions, resulting in arbitrary code execution with the privileges of the user running rpmbuild. This can be exploited when a victim or automated build system processes an attacker-controlled source tarball using rpmbuild tarball mode (such as -ts, -ta, or -tb).
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 0:4.14.3-34.el8_10
Fixed in 0:4.14.3-34.el8_10
Fixed in 0:4.16.1.3-43.el9_9
Fixed in 0:4.16.1.3-43.el9_9
Fixed in 0:4.16.1.3-40.el9_8.3
Fixed in 6.1.0-1.3.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 Enterprise Linux 8 to 0:4.14.3-34.el8_10 or later.
Upgrade Red Hat Enterprise Linux 8 to 0:4.14.3-34.el8_10 or later.
Upgrade Red Hat Enterprise Linux 9 to 0:4.16.1.3-43.el9_9 or later.
Upgrade Red Hat Enterprise Linux 9 to 0:4.16.1.3-43.el9_9 or later.
Upgrade Red Hat Enterprise Linux 9.8 Extended Update Support to 0:4.16.1.3-40.el9_8.3 or later.
Upgrade Red Hat Hardened Images to 6.1.0-1.3.hum1 or later.
Workaround
Do not process untrusted tarballs with rpmbuild -ta/-tb/-ts. Extract and inspect archives first (reject member names containing }, %, or {), or build from a reviewed .spec outside tarball mode. Prefer isolated builders (mock/container) for any untrusted packaging related work.
References
- Vendor advisory access.redhat.com/errata/RHSA-2026:100637
- Vendor advisory access.redhat.com/errata/RHSA-2026:100638
- Vendor advisory access.redhat.com/errata/RHSA-2026:100643
3 more
- Vendor advisory access.redhat.com/errata/RHSA-2026:82378
- Vendor advisory access.redhat.com/errata/RHSA-2026:99593
- 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.