CVE-2025-5917: Libarchive: off by one error in build_ustar_entry_name() at archive_write_set_format_pax.c
A vulnerability has been identified in the libarchive library. This flaw involves an 'off-by-one' miscalculation when handling prefixes and suffixes for file names. This can lead to a 1-byte write overflow. While seemingly small, such an overflow can corrupt adjacent memory, leading to unpredictable program behavior, crashes, or in specific circumstances, could be leveraged as a building block for more sophisticated exploitation. This bug affects libarchive versions prior to 3.8.0.
Security readout for executives and security teams
Plain-English summary
Libarchive versions before 3.8.0 can write one byte beyond a memory boundary while constructing certain archive entry names. This may corrupt memory or crash the calling application. More advanced exploitation is described only as a possibility, not a demonstrated outcome.
Executive priority
Treat this as routine, risk-based patching rather than an emergency. Prioritize exposed archive-generation services and multi-user systems, then address other affected deployments during normal maintenance. Escalate if internal testing reveals reliable corruption beyond denial of service.
Technical view
An off-by-one calculation in build_ustar_entry_name() within archive_write_set_format_pax.c can cause a one-byte out-of-bounds write when handling filename prefixes and suffixes. CVE-2025-5917 is classified as CWE-787 with CVSS 3.1 score 2.8, requiring local access, low privileges, and user interaction.
Likely exposure
Exposure primarily concerns applications and operating-system components using libarchive versions before 3.8.0. The bundle identifies RHEL 8, 9, and 10 and OpenShift Container Platform 4 as affected. RHEL 6 and 7 status is unknown. Actual risk depends on whether vulnerable archive-writing functionality processes attacker-influenced filenames.
Exploitation context
The source bundle provides no evidence of active exploitation, and the CVE is not listed as KEV. The documented impact is availability loss through crashes. Memory corruption could potentially support more sophisticated exploitation, but no demonstrated confidentiality or integrity impact is cited.
Researcher notes
The confirmed primitive is a one-byte write overflow in PAX-format entry-name construction. The supplied CVSS vector limits the documented outcome to availability. Red Hat product status is mixed, and the bundle does not identify fixed distribution package versions; validate remediation against current vendor guidance and backport information.
Mitigation direction
Upgrade upstream libarchive to version 3.8.0 or later where appropriate.
For Red Hat systems, apply the vendor-supported package or advisory when available.
Inventory embedded or statically linked libarchive copies that package managers may miss.
Limit untrusted users' ability to influence filenames passed into archive-writing workflows.
Validation and detection
Record installed and embedded libarchive versions across affected applications and hosts.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-787: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-787 · source CWE mapping
Out-of-bounds Write
Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.