CVE-2025-64031 Memory corruption in libarchive

Low 2.5 Published Updated

Heap-based buffer overflow in libarchive's gzip writer allows attackers to execute arbitrary code or cause denial of service via crafted original-filename fields.

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

What is CVE-2025-64031?

CVE-2025-64031 is a low-severity memory corruption vulnerability in libarchive, published on 14 Sep 2026. 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

libarchive 3.8.x before 3.8.2 has a strcpy heap-based buffer overflow in the gzip writer via the original-filename field to archive_compressor_gzip_open in archive_write_add_filter_gzip.c, aka GHSA-92wx-p669-8gr9. This relates to bsdtar. Exploitation envisions a marginally plausible scenario in which original-filename is obtained from an untrusted party. (original-filename is not derived from the input data.)

Weakness: CWE-122

Which versions are affected by CVE-2025-64031?

How do I fix CVE-2025-64031?

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-64031 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-64031 exists.

Sources

Also known as GHSA-pqgv-phc2-5p8r.

Is CVE-2025-64031 in your software?

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

Check your SBOMs for free