Skip to main content

libarchive CVE-2025-64031

| EUVDEUVD-2025-210902 LOW
Heap-based Buffer Overflow (CWE-122)
2026-09-14 mitre GHSA-pqgv-phc2-5p8r
2.5
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker supplies oversized original-filename metadata
  2. Exploit
    Vulnerable application passes string to gzip filter API
  3. Execution
    Unchecked strcpy() overflows heap buffer at offset 10
  4. Impact
    Heap corruption triggers process crash (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three simultaneous conditions: (1) the vulnerable application must invoke libarchive's gzip compression filter (archive_write_add_filter_gzip) with an explicitly set original-filename value - this is NOT automatically populated from the file being archived; (2) that original-filename value must be attacker-controlled or derived from untrusted input, which is an application design choice rather than a default; and (3) the value must exceed the remaining space in the gzip header buffer (typically a few hundred bytes above the 10-byte header offset). The CVSS vector additionally requires local access (AV:L) and user interaction (UI:R), meaning a victim application or user must actively trigger the archiving operation. Default bsdtar usage and standard libarchive archive creation workflows that do not set a custom original-filename are entirely unaffected. The CVE description explicitly acknowledges the exploitation scenario is 'marginally plausible.'

Impact

The CVSS 2.5 score with vector AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L is an appropriately conservative, low-severity assessment consistent with the exploitation constraints. All signals align: the attack vector is local (AV:L), complexity is high (AC:H) because the marginally plausible scenario requires an application to accept and relay a long, attacker-controlled original-filename to the libarchive API, user interaction is required (UI:R), and the sole impact is limited availability (A:L - a crash, not code execution). There is no confidentiality or integrity impact. No CISA KEV listing exists, no EPSS data was provided in the input (though the low CVSS and non-default trigger suggest it would be negligible), and the referenced PoC gist has not been confirmed as a working weaponized exploit. This is a genuine low-priority maintenance fix rather than an urgent patching emergency for most deployments.

Exploit ScenarioDerived

An application that constructs gzip archives from untrusted metadata (e.g., a workflow that reads a user-supplied or third-party-supplied filename and passes it as the GZIP original-filename parameter) would be vulnerable if an attacker can influence that value. The attacker supplies a string longer than the pre-allocated compressed header buffer; the strcpy overflows the heap allocation, causing the process to crash. A PoC gist is publicly referenced at https://gist.github.com/ttuurrnn/1365a4a9b1c3d5826a3a9bbe111f26b8, though this non-default API usage pattern severely limits real-world impact.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 14, 2026

Unchecked strcpy() of the GZIP original-filename header field in libarchive 3.8.x causes a heap-based buffer overflow (CWE-122) in the gzip compression writer, with impact limited to a low-severity application crash. The overflow can only be triggered when a caller explicitly passes an overly long, untrusted original-filename string through the libarchive API - a condition the CVE itself characterizes as marginally plausible, since this field is not derived from archived input data. No active exploitation has been confirmed, and the official CVSS score of 2.5 (Low) with AV:L/AC:H/UI:R accurately reflects the constrained, non-default exploitation path.

RemediationAI

Upgrade to libarchive 3.8.2, which replaces the unbounded strcpy() with a length-checked bounded copy, limits the GZIP original-filename field to the lesser of 32,768 bytes or the remaining space in the compressed header buffer, and discards oversized filenames with an ARCHIVE_WARN return rather than a buffer overflow. The fix is available upstream via PR #2734 at https://github.com/libarchive/libarchive/pull/2734. Applications that never set a gzip original-filename via the libarchive API are not exposed to this code path and require no immediate action. As a compensating control before patching, audit all call sites that invoke archive_write_add_filter_gzip() to ensure any original-filename value is either truncated to a safe length or sourced exclusively from trusted, length-bounded inputs - this eliminates the attack surface without patching but requires application-level code review.

Affected VersionsENISA

libarchive 3.8.0 <3.8.2

Affected Packages

euvd libarchive fix: 3.8.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

libarchive is a widely-used C library for reading and writing archive formats (tar, zip, cpio, etc.) and is the backend for the bsdtar utility. The affected code lives in archive_write_add_filter_gzip.c, specifically in archive_compressor_gzip_open(). The GZIP format (RFC 1952) supports an optional FNAME header field storing the original filename of the compressed content. Prior to 3.8.2, the code unconditionally performed strcpy((char*)data->compressed + 10, data->original_filename) into a fixed-size heap-allocated buffer without first validating the length of the source string. The PR #2734 diff confirms the root cause: the fix replaces the raw strcpy with a bounded copy that limits the filename to min(32768, available_buffer_space) bytes and gracefully emits ARCHIVE_WARN if the filename is too long, rather than copying it. Affected CPE: cpe:2.3:a:libarchive:libarchive:*:*:*:*:*:*:*:* (3.8.x series before 3.8.2).

Know when Libarchive gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 2.5 LOW
AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L
vuln.today AI 2.5 LOW

Local access and high complexity reflect the non-default API usage required; impact is crash-only (A:L) with no confidentiality or integrity consequence.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L
4.0 AV:L/AC:H/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Sep 14, 2026 - 02:01 EUVD
CVE Published
Sep 14, 2026 - 00:00 cve.org
LOW 2.5

DescriptionCVE.org

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.)

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
core archiving library in most Linux, macOS, and BSD distributions
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

CVE-2025-5914 HIGH POC
7.8 Jun 09

CVE-2025-5914 is an integer overflow vulnerability in libarchive's archive_read_format_rar_seek_data() function that lea

CVE-2024-37407 CRITICAL POC
9.1 Jun 08

Libarchive before 3.7.4 allows name out-of-bounds access when a ZIP archive has an empty-name file and mac-ext is enable

CVE-2016-5418 HIGH POC
7.5 Sep 21

The sandboxing code in libarchive 3.2.0 and earlier mishandles hardlink archive entries of non-zero data size, which mig

CVE-2016-4301 HIGH POC
7.8 Sep 21

Stack-based buffer overflow in the parse_device function in archive_read_support_format_mtree.c in libarchive before 3.2

CVE-2016-4302 HIGH POC
7.8 Sep 21

Heap-based buffer overflow in the parse_codes function in archive_read_support_format_rar.c in libarchive before 3.2.1 a

CVE-2016-4300 HIGH POC
7.8 Sep 21

Integer overflow in the read_SubStreamsInfo function in archive_read_support_format_7zip.c in libarchive before 3.2.1 al

CVE-2015-8931 HIGH POC
7.8 Sep 20

Multiple integer overflows in the (1) get_time_t_max and (2) get_time_t_min functions in archive_read_support_format_mtr

CVE-2024-48615 HIGH POC
7.5 Mar 28

Null Pointer Dereference vulnerability in libarchive 3.7.6 and earlier when running program bsdtar in function header_pa

CVE-2015-2304 MEDIUM POC
6.4 Mar 15

Absolute path traversal vulnerability in bsdcpio in libarchive 3.1.2 and earlier allows remote attackers to write to arb

CVE-2016-5844 MEDIUM POC
6.5 Sep 21

Integer overflow in the ISO parser in libarchive before 3.2.1 allows remote attackers to cause a denial of service (appl

CVE-2016-1541 HIGH
8.8 May 07

Heap-based buffer overflow in the zip_read_mac_metadata function in archive_read_support_format_zip.c in libarchive befo

CVE-2022-26280 MEDIUM POC
6.5 Mar 28

Libarchive v3.6.0 was discovered to contain an out-of-bounds read via the component zipx_lzma_alone_init. Rated medium s

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy