---
id: "CVE-2026-17591"
kind: "vulnerability"
aliases: ["CVE-2026-17591"]
title: "libarchive: use-after-free in archive_entry_copy_mac_metadata crashes or leaks memory"
severity: "low"
cvss: 3.6
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c-library", "libarchive", "package"]
not_affected_if: ["no-untrusted-archives"]
published_at: "2026-10-16T23:17:01+00:00"
first_seen_at: "2026-10-23T21:57:14+00:00"
updated_at: "2026-10-25T04:45:31+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-17591", "first_seen_at": "2026-10-23T21:57:14+00:00"}]
---

# libarchive: use-after-free in archive_entry_copy_mac_metadata crashes or leaks memory

libarchive's archive_entry_copy_mac_metadata() frees an internal buffer before finishing a copy, leaving a use-after-free. An attacker who can feed archive input to an application using this function can crash it or read stale memory.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- unknown

## Fix

- unknown

## Timeline

- 2026-10-23T21:57:14+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-17591

## From the sources

A flaw was found in libarchive. An attacker can cause a Denial of Service (DoS) or potential information disclosure due to a use-after-free vulnerability, which occurs when a program reads memory that has already been released. This issue arises when the archive_entry_copy_mac_metadata() function deallocates an internal buffer before completing a data copy. An attacker who can supply input to an application utilizing this function can trigger the flaw to crash the application or read uninitialized memory data.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
