CVE-2026-78367
High · 7.0CVSS
7.0
EPSS
0.2%
Published
Aug 24, 2026
CISA due date
—
Cloudanix analysis
A flaw in how package build tools handle specially made archive files lets attackers run their own commands on developers' or build servers' machines if those archives are used.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Attacker-controlled tar member names are passed unsanitized into rpmExpand() via %{basename:...} macro expansion in getTarSpec(), enabling injection of arbitrary RPM macros including Lua code that executes during rpmbuild processing.
Why it matters to the business
Build systems and developers handling untrusted source archives can have their build environments fully compromised, leading to supply-chain poisoning, credential theft, or insertion of malicious code into produced packages.
How an attack unfolds
An attacker crafts a tarball containing a .spec file whose member name embeds malicious RPM macro syntax including Lua expressions. When the victim runs rpmbuild with tarball options on the archive, the name is expanded through rpmExpand() resulting in code execution under the rpmbuild user's privileges.
How to fix it
Upgrade rpmbuild to a version containing the fix for macro sanitization in tarball member name handling. Until a patched release is available, avoid processing untrusted tarballs with rpmbuild tarball modes; use alternative build workflows that do not rely on rpmbuild -t* options.
How to confirm the fix worked
Confirm the installed rpm version contains the upstream patch that sanitizes tar member names before passing them to rpmExpand(); test by attempting to build with a crafted tarball containing a macro-injecting member name and verify no code execution occurs.
Typical attack path
- Attacker creates malicious tarball with crafted .spec member name containing macro injection
- Victim or CI system invokes rpmbuild -ts/-ta/-tb against the archive
- getTarSpec() feeds the member name into a %{basename:...} expression
- rpmExpand() evaluates the injected macros and Lua code
- Arbitrary commands execute with the privileges of the rpmbuild process
How to detect it
Review rpmbuild logs and process execution traces for unexpected macro expansions or Lua script activity during tarball processing; look for child processes spawned by rpmbuild that are not part of normal package building.
What your security team should do
- Block or sandbox rpmbuild tarball modes when ingesting external archives
- Monitor for upcoming rpm releases and apply the fix immediately upon availability
- Prefer source RPMs or git-based builds over direct tarball processing for third-party code
The record
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 packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-115878 Stanza is a Stanford NLP Python library for tokenization, sentence segmentation, NER, and… CWE-94
- CVE-2026-115731 Deserialization of untrusted data in the report-processing code of Puppet, as used by… CWE-94
- CVE-2026-63471 fastapi-code-generator creates FastAPI applications from OpenAPI files. CWE-94
- CVE-2026-63470 fastapi-code-generator creates FastAPI applications from OpenAPI files. CWE-94
- CVE-2026-63469 fastapi-code-generator creates FastAPI applications from OpenAPI files. CWE-94
- CVE-2026-44267 Elo is a purely functional expression language for no-code tools. CWE-94
- CVE-2026-44266 Elo is a purely functional expression language for no-code tools. CWE-94
- CVE-2026-44265 Elo is a purely functional expression language for no-code tools. CWE-94