REDHAT-BUG-2521857: Medium severity Red Hat rpmbuild vulnerability

Published Aug 24, 2026
·
Updated

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.

Affected Software

1 affected component
Red Hat rpmbuild

Event History

Aug 24, 2026
Data Sourced
via Red Hat·01:09 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which rpmbuild workflows are exposed to this issue?

The affected path is used when rpmbuild operates on a tarball, including -ta, -tb, and -ts modes. The issue occurs while rpmbuild locates and extracts the spec file from the archive, before %prep runs.

2

What must an attacker do to trigger exploitation?

An attacker needs to provide a crafted tarball whose .spec archive member name contains RPM macro syntax that prematurely closes the %{basename:...} expansion. Exploitation requires a victim to invoke rpmbuild in a tarball mode on that archive.

3

Does the fix for CVE-2026-44604 address this path?

No. CVE-2026-44604 concerns a different call site, and it did not fix the getTarSpec() path involved here.

4

How can I determine whether a build process is exposed?

A process is exposed if it runs rpmbuild with tarball-mode options such as -ts, -ta, or -tb on tarballs that may be attacker-controlled or otherwise untrusted. The relevant archive metadata is the member name of the .spec file.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203