CVE-2026-78367

Rpm: rpmbuild gettarspec() crafted tar member name → macro injection

State
Published
Severity
7.0 High
Published
Aug 24, 2026
Updated
Oct 14, 2026
Reserved
Aug 24, 2026

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.17.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:Hredhat

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')

Affected Products

ProductVersions
Red Hat Hardened ImagesRed Hat
  • 6.1.0-1.3.hum1 and laterNot affected
Red Hat Enterprise Linux 10Red Hat
    Red Hat Enterprise Linux 6Red Hat
      Red Hat Enterprise Linux 7Red Hat
        Red Hat Enterprise Linux 8Red Hat
          Red Hat Enterprise Linux 9Red Hat

            References

            Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.