#1146602 rpm: CVE-2026-44605 CVE-2026-84233 CVE-2026-84837 CVE-2026-84838

Package:
src:rpm
Source:
src:rpm
Submitter:
Salvatore Bonaccorso
Date:
2026-11-06 03:27:01 UTC
Severity:
normal
Tags:
#1146602#5
Date:
2026-09-03 18:48:02 UTC
From:
To:
Hi,

The following vulnerabilities were published for rpm.

Unfortunately there are not much additional information available, can
you please research for the individual CVEs if there is any other
project reference to issues and/or fixing commits (apart the for now
only in Red Hat bugzilla found information)?

CVE-2026-44605[0]:
| A flaw was found in the RPM Package Manager (RPM). A local user
| could be affected by a heap buffer overflow vulnerability when
| processing a specially crafted NDB database file. This issue arises
| from an error in how RPM handles certain calculations during file
| parsing, leading to an incorrect memory allocation. An attacker
| could leverage this to cause a denial of service, making the system
| unavailable.


CVE-2026-84233[1]:
| A flaw was found in rpm. A local attacker could supply a specially
| crafted `.gem` filename containing RPM macro syntax. When a user or
| automated workflow invokes `rpmuncompress -x` on this file, the
| macro expansion occurs during command construction. This allows the
| attacker to execute arbitrary commands with the privileges of the
| invoking account, leading to a compromise of confidentiality,
| integrity, and availability.


CVE-2026-84837[2]:
| A flaw was found in rpm. An attacker can exploit a command injection
| vulnerability by influencing the path or filename of a tarball
| processed by `rpmbuild -t*` to include shell metacharacters. This is
| particularly relevant in automated build or continuous integration
| (CI) workflows that ingest externally supplied artifact names.
| Successful exploitation allows for arbitrary command execution with
| the privileges of the build user, which could lead to information
| disclosure or disruption of the build environment.


CVE-2026-84838[3]:
| A flaw was found in rpmuncompress. This command injection
| vulnerability allows a local attacker to execute arbitrary commands.
| This occurs when rpmuncompress processes a specially crafted archive
| filename containing shell metacharacters, which are not properly
| escaped before being passed to shell command strings. Successful
| exploitation requires user interaction, where a user or automated
| workflow invokes rpmuncompress on the malicious file, leading to
| high impact on the confidentiality, integrity, and availability of
| data accessible to the invoking user.


If you fix the vulnerabilities please also make sure to include the
CVE (Common Vulnerabilities & Exposures) ids in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-44605
https://www.cve.org/CVERecord?id=CVE-2026-44605
[1] https://security-tracker.debian.org/tracker/CVE-2026-84233
https://www.cve.org/CVERecord?id=CVE-2026-84233
[2] https://security-tracker.debian.org/tracker/CVE-2026-84837
https://www.cve.org/CVERecord?id=CVE-2026-84837
[3] https://security-tracker.debian.org/tracker/CVE-2026-84838
https://www.cve.org/CVERecord?id=CVE-2026-84838

Please adjust the affected versions in the BTS as needed.

Regards,
Salvatore

#1146602#10
Date:
2026-11-06 03:24:40 UTC
From:
To:
Hi Salvatore,

For the rpmbuild/rpmuncompress command-injection part of this report I
have built and tested backports and attached them for trixie and
bookworm. (On 2026-11-03 I sent the full upstream commit map for all
four CVEs to debian-security-tracker; this is the follow-up with the
tested patches.)

Attached:
CVE-2026-84837-rpm-4.20.patch trixie, rpm 4.20.1
CVE-2026-84837-rpm-4.18.patch bookworm, rpm 4.18.0

Each patch combines upstream 7a4111bc5db4 ("Prevent command injection
via rpmbuild -t filename"; Fixes: CVE-2026-84837 CVE-2026-84838) with
its .gem follow-up PR #4371 (e7a086a8e203 makes rpopen variadic;
e95f1b29ae27 passes the RubyGem basename positionally). The tarball
filename reaches a shell in getTarSpec() (rpmbuild) and in rpmuncompress,
and the derived .gem spec output name does too, so a crafted filename or
a crafted .gem basename runs arbitrary commands. The fix passes the
filename to /bin/sh as $1 and the derived .gemspec output name as $2, so
neither is interpolated into the command string.

Packaging notes:
- 4.20: rpopen/rpclose go into tools/cliutils and rpmuncompress is
linked against it.
- 4.18 has no shared cliutils linked into both tools, so a
self-contained static rpopen/rpclose is added to rpmbuild.c and
rpmuncompress.c (no autotools changes).
- My positional numbering differs from upstream (here filename=$1,
gemspec-name=$2; upstream uses basename=$1, filename=$2) but the
effect is identical; this is noted in the patch header. Upstream
test hunks dropped.
- These are a follow-up to the CVE-2026-78367 backports in #1145876
and apply on top of them (apply those first; only small line
offsets).

Scope:
- CVE-2026-84837 and CVE-2026-84838: both fixed, including the
RubyGem (.gem) path.
- CVE-2026-84233 (command execution via macro expansion in the
crafted .gem path) overlaps 84838 and, as far as I can tell, is the
same code path closed by e95f1b29ae27, so these patches should
address it too; upstream never linked a commit to 84233, so treat
that mapping as likely but unconfirmed.
- CVE-2026-44605 (ndb integer/heap overflow) is a separate issue and
is NOT addressed here; the upstream commits are in my 2026-11-03
tracker mail.

Testing (both 4.20.1 and 4.18.0, built from the Debian source):
- tar.gz filename, via rpmbuild -ts on a file whose name contains
$(...): unpatched runs the embedded command; patched does not, and
the tarball is still unpacked and the SRPM is built normally.
- .gem filename, via rpmuncompress -x on a .gem whose basename
contains a single-quote breakout (with %__gem stubbed so the command
chain is reached): with only 7a4111bc5 the command still runs; with
the follow-up it does not. Confirmed on both suites.

bullseye (4.16): the rpmbuild.c part applies with an offset, but
rpmuncompress is structured differently there and needs a separate
adaptation; I can do that if useful.

Regards,
Sumit