CVE-2025-5917
Low · 2.8CVSS
2.8
EPSS
0.2%
Published
Jun 9, 2025
CISA due date
—
Cloudanix analysis
A small mistake in code that reads archive files can cause programs to crash or behave oddly when they encounter certain specially made files, so updating the library removes the problem.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Off-by-one miscalculation during prefix/suffix handling for archive entry filenames triggers a single-byte write beyond allocated buffer, corrupting adjacent heap memory and potentially causing crashes or enabling limited control-flow manipulation.
Why it matters to the business
Applications that extract or list archives may crash or behave unpredictably when processing malicious files, leading to disrupted backup, packaging, or distribution workflows and requiring emergency patching across developer and operations tooling.
How an attack unfolds
An attacker crafts an archive entry whose filename prefix or suffix is sized to trigger the off-by-one write during parsing; the malformed archive is supplied to any process using a vulnerable libarchive build, resulting in memory corruption that can be chained for denial of service or, in ideal conditions, further exploitation.
How to fix it
Upgrade libarchive to version 3.8.0 or later; the specific fix is present in commit 70ff28fcf04ec129a1d064f96e49aa57fcc90e37. Rebuild and redeploy all dependent packages and containers. Until patches are applied, restrict untrusted archive processing to isolated environments.
How to confirm the fix worked
Confirm installed libarchive version is 3.8.0 or newer; run regression tests with archives containing long prefix/suffix filename combinations; monitor for absence of crashes or heap sanitizer violations on previously triggering inputs.
Typical attack path
- Identify target application or script that uses libarchive to read archives
- Craft archive containing filename metadata engineered to overflow by one byte
- Deliver archive via download, attachment, or shared storage
- Trigger parsing of the archive entry names inside the vulnerable process
- Observe crash or attempt to leverage resulting memory corruption
How to detect it
Review process crash logs and core dumps for libarchive-related segmentation faults; inspect application logs for sudden failures during archive extraction; correlate with file creation or download events involving archives from untrusted sources.
What your security team should do
- Prioritize patching all systems that invoke libarchive on untrusted input within 30 days
- Add libarchive version checks to software bill-of-materials and dependency scanners
- Enable heap integrity protections and ASLR on hosts running archive utilities
- Restrict archive extraction privileges to least-privilege service accounts
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | libarchive | 0 | No fix |
| Debian:12 | libarchive | 0 | No fix |
| Debian:13 | libarchive | 0 | No fix |
| Debian:14 | libarchive | 0 | 3.7.4-4 |
| Mageia:9 | libarchive | 0 | 3.6.2-5.5.mga9 |
| SUSE:Linux Enterprise Micro 5.3 | libarchive | 0 | 3.5.1-150400.3.21.1 |
| SUSE:Linux Enterprise Micro 5.4 | libarchive | 0 | 3.5.1-150400.3.21.1 |
| SUSE:Linux Enterprise Micro 5.5 | libarchive | 0 | 3.5.1-150400.3.21.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | libarchive | 0 | 3.7.2-150600.3.17.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | libarchive | 0 | 3.7.2-150600.3.17.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | libarchive | 0 | 3.7.2-150600.3.17.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | libarchive | 0 | 3.7.2-150600.3.17.1 |
| openSUSE:Leap 15.6 | libarchive | 0 | 3.7.2-150600.3.17.1 |
Related vulnerabilities
- JLSEC-2025-250 libarchive through 3.7.7 has a heap-based buffer over-read in header_gnu_longlink in… Also affects libarchive
- CVE-2025-5918 A vulnerability has been identified in the libarchive library. Also affects libarchive
- CVE-2025-5916 A vulnerability has been identified in the libarchive library. Also affects libarchive
- CVE-2025-5915 A vulnerability has been identified in the libarchive library. Also affects libarchive
- CVE-2025-5914 A vulnerability has been identified in the libarchive library, specifically within the… Also affects libarchive
- CVE-2025-25724 list_item_verbose in tar/util.c in libarchive through 3.7.7 does not check an strftime… Also affects libarchive
- CVE-2025-1632 A vulnerability was found in libarchive up to 3.7.7. Also affects libarchive
- CVE-2024-57970 libarchive through 3.7.7 has a heap-based buffer over-read in header_gnu_longlink in… Also affects libarchive