Bug 2521857 (CVE-2026-78367) - CVE-2026-78367 rpm: rpmbuild getTarSpec() crafted tar member name → macro injection
Summary: CVE-2026-78367 rpm: rpmbuild getTarSpec() crafted tar member name → macro inj...
Keywords:
Status: NEW
Alias: CVE-2026-78367
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2521902
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-24 13:09 UTC by OSIDB Bzimport
Modified: 2026-08-24 16:07 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-08-24 13:09:33 UTC
When rpmbuild runs in tarball mode (-ta / -tb / -ts, etc.), getTarSpec() extracts a .spec from the archive and renames it using the member name from tar’s verbose listing. That member name is concatenated into:

specFinal = rpmExpand("%{_specdir}/%{basename:", tarbuf, "}", NULL);

A crafted .spec member name containing } closes %{basename:...} early. Text after the } is expanded as further RPM macros, including %{lua:} (full Lua stdlib, rpm.execute / rpm.spawn). The expanded string is used as the destination of rename() and as the spec path for the rest of the build.

This happens while locating the spec — before %prep. It is not “spec scripts run shell by design.” The victim only needs to run rpmbuild -ts (or -ta / -tb) on a crafted tarball.

This is a sibling / variant of CVE-2026-44604: untrusted archive metadata (here: tar member name; there: ZIP/7z/GEM top-level directory) is interpolated into a privileged expand/popen path. Different call site (getTarSpec vs rpmuncompress), same trust-boundary class. CVE-2026-44604 did not fix this path.


Note You need to log in before you can comment on or make changes to this bug.