CVE-2025-5917 Libarchive: off by one error in build_ustar_entry_name() at archive_write_set_format_pax.c

Low 2.8 Published Updated

An off-by-one error in Libarchive allows a 1-byte write overflow, potentially causing crashes or enabling code execution.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-5917?

CVE-2025-5917 is a low-severity memory corruption vulnerability in Libarchive Libarchive, published on 9 Jun 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-787

Which versions are affected by CVE-2025-5917?

It affects 3 products.

Products include Libarchive Libarchive, Redhat Enterprise Linux, Redhat Openshift Container Platform.

How do I fix CVE-2025-5917?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-5917 being exploited?

There is no known exploitation of CVE-2025-5917 in the wild and no public exploit code.

All Libarchive Libarchive vulnerabilities

Sources

Also known as AZL-63756, AZL-63777, AZL-63818, AZL-63854, BELL-CVE-2025-5917, DEBIAN-CVE-2025-5917 and 5 more.

Is CVE-2025-5917 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free