Skip to main content
Vulnerability Database/CVE-2026-95520

CVE-2026-95520: RPM Package Heap Buffer Overflow Vulnerability

CVE-2026-95520 is a heap-based buffer overflow in RPM package manager that allows attackers to execute arbitrary code via malicious packages. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-95520 Overview

CVE-2026-95520 is a heap-based buffer overflow [CWE-787] in the RPM Package Manager. The flaw resides in iterReadArchiveNext() and triggers when parsing a symlink entry inside an untrusted RPM package. A crafted RPMTAG_LONGFILESIZES value of 0xFFFFFFFFFFFFFFFF causes an integer overflow that shrinks the destination buffer allocation to a single byte. The attacker-controlled cpio filesize field then writes arbitrary data past the end of that allocation. The condition is reachable through common inspection tools including rpm2cpio, rpm2archive, and rpm -qlvp.

Critical Impact

Processing an untrusted RPM package with routine inspection commands can corrupt heap memory, enabling code execution or process termination in the context of the invoking user.

Affected Products

  • RPM Package Manager (rpm)
  • Linux distributions bundling the vulnerable rpm codebase, including Red Hat Enterprise Linux (per vendor advisory)
  • Tooling that links against librpm for archive extraction, including rpm2cpio and rpm2archive

Discovery Timeline

  • 2026-09-29 - CVE CVE-2026-95520 published to NVD
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-95520

Vulnerability Analysis

The defect is an integer overflow that leads to an undersized heap allocation followed by an out-of-bounds write. When iterReadArchiveNext() processes a symlink entry, it uses the value stored in RPMTAG_LONGFILESIZES to size a buffer for the link target. Setting this value to 0xFFFFFFFFFFFFFFFF (unsigned 64-bit maximum) triggers arithmetic that wraps around and produces a one-byte allocation.

The code path then copies data whose length is governed by an independent cpio header field. Because the two size sources are never cross-validated, the copy proceeds using the attacker's chosen length against a one-byte destination. The result is a linear heap overflow with attacker-controlled content and length.

Exploitation requires local interaction, such as a user running an RPM inspection command against a downloaded package. Impact covers integrity and availability but not confidentiality, consistent with a write-based memory corruption primitive.

Root Cause

The root cause is missing validation of RPMTAG_LONGFILESIZES prior to allocation, combined with reliance on a second, independently attacker-controlled length field during the subsequent copy. Trusting metadata from an unsigned package for allocation sizing violates the safe-parsing invariant that allocation length and copy length must derive from a single validated source.

Attack Vector

An attacker crafts a malicious RPM package containing a symlink entry with the malformed RPMTAG_LONGFILESIZES tag and an oversized cpio filesize. The attacker delivers the package through any channel that leads a user to inspect it, such as a mirror, email attachment, or repository. Running rpm2cpio package.rpm, rpm2archive package.rpm, or rpm -qlvp package.rpm triggers the overflow. No package installation is required, which lowers the barrier for reaching vulnerable code during triage of untrusted files. See the Red Hat CVE-2026-95520 Advisory for vendor-specific detail.

Detection Methods for CVE-2026-95520

Indicators of Compromise

  • Crashes or abort signals from rpm, rpm2cpio, or rpm2archive processes when handling untrusted .rpm files
  • Presence of .rpm files whose header records a RPMTAG_LONGFILESIZES value of 0xFFFFFFFFFFFFFFFF for symlink entries
  • Unexpected child processes or shell activity spawned from user sessions immediately after RPM inspection commands

Detection Strategies

  • Inspect RPM headers with rpm -qp --qf '%{LONGFILESIZES}\n' package.rpm and flag entries reporting the 64-bit max value
  • Monitor for SIGABRT or SIGSEGV terminations of RPM-family binaries via audit or coredumpctl records
  • Run untrusted RPM inspection inside sandboxed environments with heap hardening (MALLOC_CHECK_, glibc tcache tuning) to surface corruption early

Monitoring Recommendations

  • Enable Linux audit rules on execve for rpm, rpm2cpio, and rpm2archive to correlate command usage with subsequent crashes
  • Ship glibc abort() telemetry and core dump metadata to a central log platform for retrospective hunting
  • Track package provenance and signature status; alert when unsigned RPMs are inspected on production or engineering hosts

How to Mitigate CVE-2026-95520

Immediate Actions Required

  • Apply vendor-supplied rpm package updates as soon as they are available from your distribution
  • Refuse to run rpm2cpio, rpm2archive, or rpm -qlvp on RPM files from untrusted sources until patched
  • Require GPG signature verification before any RPM inspection or extraction workflow

Patch Information

Refer to the Red Hat CVE-2026-95520 Advisory and the tracking entry in Red Hat Bug Report #2537809 for fixed package versions. Downstream distributions will ship rebuilt rpm packages once the upstream fix is merged.

Workarounds

  • Perform RPM triage inside a disposable virtual machine or container isolated from production data
  • Restrict which users may invoke RPM tooling on untrusted files using sudo policies and file access controls
  • Validate RPMTAG_LONGFILESIZES values with a preprocessing script that rejects packages whose symlink size fields exceed a sane threshold
bash
# Configuration example: reject RPMs with malformed LONGFILESIZES before inspection
rpm -qp --qf '%{LONGFILESIZES}\n' "$1" | awk '
  { if ($1 == "18446744073709551615") { print "Refusing: malformed RPMTAG_LONGFILESIZES"; exit 1 } }
'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.