Description
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).
Published: 2026-08-24
Score: 7 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary Code Execution
Action: Patch
AI Analysis

Impact

A crafted source tarball can be used in rpmbuild’s tarball mode to inject arbitrary macro expansions. The getTarSpec() function passes a tar member name directly into rpmExpand() as part of a %{basename:…} macro. Because the member name is user‑controlled, an attacker may embed Lua code that will be executed with the privileges of the user running rpmbuild. The flaw is a code injection vulnerability classified as CWE‑94, and its primary impact is the ability to execute arbitrary code on the build system.

Affected Systems

The vulnerability affects the rpmbuild component used across several Red Hat distributions. Affected releases include Red Hat Enterprise Linux 6, 7, 8, 9 and 10, Red Hat Hardened Images, and Red Hat OpenShift Container Platform 4. All of these products rely on the same rpmbuild engine, so any system that processes an untrusted source tarball with rpmbuild tarball mode is vulnerable.

Risk and Exploitability

With a CVSS score of 7 the vulnerability is considered high severity. EPSS data is not available and the issue is not listed in CISA’s KEV catalog, suggesting no widely used exploit yet. Nonetheless, the attack path is simple: any user or automated build system that runs rpmbuild with the –ta, –tb, or –ts options against a malicious archive can trigger the macro expansion and run arbitrary Lua code with build‑user privileges. The risk is significant for organizations that perform local or CI pipeline packaging without isolation or prior validation of source archives.

Generated by OpenCVE AI on August 24, 2026 at 19:24 UTC.

Remediation

Vendor 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.


OpenCVE Recommended Actions

  • Build packages in an isolated, trusted environment such as mock or a container; avoid using rpmbuild –ta / –tb / –ts against untrusted archives.
  • Pre‑process tarballs by extracting them and rejecting any member names containing the characters {, }, or % before invoking rpmbuild.
  • Use a reviewed, standalone .spec file instead of tarball mode when building RPMs.
  • Update rpmbuild to a patched version when available.

Generated by OpenCVE AI on August 24, 2026 at 19:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 11:30:00 +0000

Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:4
Vendors & Products Redhat openshift

Tue, 25 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 24 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-74

Mon, 24 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
Description A flaw was found in rpmbuild. When rpmbuild processes a crafted tarball in tarball mode, a specially designed tar member name can lead to macro injection. This vulnerability allows a remote attacker to execute arbitrary code on the system by convincing a user to build a malicious tarball. 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).
Weaknesses CWE-94

Mon, 24 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Mon, 24 Aug 2026 14:00:00 +0000

Type Values Removed Values Added
Description A flaw was found in rpmbuild. When rpmbuild processes a crafted tarball in tarball mode, a specially designed tar member name can lead to macro injection. This vulnerability allows a remote attacker to execute arbitrary code on the system by convincing a user to build a malicious tarball.
Title Rpm: rpmbuild gettarspec() crafted tar member name → macro injection
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
Weaknesses CWE-74
CPEs cpe:/a:redhat:hummingbird:1
cpe:/a:redhat:openshift:4
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
References
Metrics cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Redhat Enterprise Linux Hummingbird
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-09-04T11:13:52.435Z

Reserved: 2026-08-24T12:52:02.839Z

Link: CVE-2026-78367

cve-icon Vulnrichment

Updated: 2026-08-24T15:14:00.725Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-08-24T14:17:04.767

Modified: 2026-09-04T12:17:19.023

Link: CVE-2026-78367

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-24T00:00:00Z

Links: CVE-2026-78367 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-24T19:30:17Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')