CVE-2026-95520
rpm: rpm: integer overflow in iterReadArchiveNext() leads to heap-based buffer overflow when parsing untrusted RPM packages
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 29, 2026
Updated · September 29, 2026
Description
A heap-based buffer overflow flaw was found in rpm. Parsing a symlink entry in an untrusted RPM package whose declared RPMTAG_LONGFILESIZES value is 0xFFFFFFFFFFFFFFFF causes an integer overflow in iterReadArchiveNext() that shrinks a buffer allocation to one byte, after which the payload's independently-controlled cpio filesize field is used to write attacker-controlled data past the end of that allocation. This is reachable via rpm2cpio, rpm2archive, and rpm -qlvp on an untrusted package.
Statement
This issue is rated Moderate because, while parsing a crafted RPM triggers an attacker-controlled-length heap write, exploitation is local: a user or automated workflow must choose to run rpm2cpio, rpm2archive, rpm -qlvp, or an install/rebuild against the untrusted package. The flaw is not exposed as a network service, consistent with other Moderate-rated integer-overflow/heap-overflow flaws already tracked against the same iterReadArchiveNext() symlink-handling code path.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To reduce exposure, avoid processing or extracting RPM packages from untrusted sources. Do not use rpm2cpio, rpm2archive, or rpm -qlvp on RPM files whose origin and integrity cannot be verified.
CVSS / CWE
CVSS 3.1 · 7.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H
CWE-787 · Out-of-bounds Write