Cloudanix VulnDB

CVE-2016-5418

High · 7.5

CVSS

7.5

EPSS

4.7%

Published

Sep 21, 2016

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a widely used library for reading compressed files can let attackers overwrite important system files when a crafted archive is opened, potentially breaking or taking over the affected computer.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The sandboxing logic in libarchive fails to correctly handle hardlink entries that contain non-zero data, allowing archive extraction to write file content to arbitrary paths on the host filesystem instead of restricting writes to the intended extraction directory.

Why it matters to the business

Systems that process untrusted archive files risk arbitrary file overwrites that can corrupt configuration, replace binaries, or enable follow-on compromise; although the issue is years old, public exploit code increases the chance of automated attacks against any remaining vulnerable deployments.

How an attack unfolds

An attacker creates a specially crafted archive containing hardlink entries that reference sensitive target paths and include non-zero data payloads; when a victim application or user extracts the archive with a vulnerable libarchive build, the sandbox check is bypassed and the payload data is written directly to the attacker-chosen locations.

How to fix it

Upgrade libarchive to a build containing commit dfd6b54ce33960e420fb206d8872fb759b577ad9 or later; for the Chainguard kubernetes-csi-livenessprobe-fips-2.10 package, deploy version 2.10.0-r6 or newer. Rebuild and redeploy any containers or packages that statically link the vulnerable library.

How to confirm the fix worked

Confirm the installed libarchive version or commit hash against the fixed commit; run extraction of a test archive containing hardlinks with data size and verify that writes remain confined to the target directory.

Typical attack path

  1. Attacker generates malicious archive with oversized hardlinks
  2. Archive is delivered via download, email, or supply-chain channel
  3. Target system invokes libarchive extraction on the file
  4. Sandbox validation incorrectly permits writes outside the extraction root
  5. Arbitrary files are overwritten, enabling persistence or escalation

How to detect it

Review application and system logs for archive extraction events that reference unexpected destination paths; inspect file-integrity monitoring for unexpected overwrites of configuration or binary files immediately following archive processing; correlate with process execution of tools that link against libarchive.

What your security team should do

  • Prioritize patching all instances of libarchive to the fixed commit or newer releases
  • Inventory downstream consumers of libarchive within container images and CI pipelines
  • Add archive extraction to the list of untrusted-input processing steps that require sandboxing or allow-listing
  • Monitor EPSS and exploit-availability feeds for any renewed interest in this older issue

The record

The sandboxing code in libarchive 3.2.0 and earlier mishandles hardlink archive entries of non-zero data size, which might allow remote attackers to write to arbitrary files via a crafted archive file.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 libarchive 0 3.2.1-4
Debian:12 libarchive 0 3.2.1-4
Debian:13 libarchive 0 3.2.1-4
Debian:14 libarchive 0 3.2.1-4
Debian:7 libarchive 0 3.0.4-3+wheezy4
Debian:8 libarchive 0 3.1.2-11+deb8u3
Mageia:5 libarchive 0 3.2.1-1.2.mga5
Red Hat:enterprise_linux:6::client libarchive 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::client libarchive-debuginfo 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::client libarchive-devel 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::computenode libarchive 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::computenode libarchive-debuginfo 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::computenode libarchive-devel 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::server libarchive 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::server libarchive-debuginfo 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::server libarchive-devel 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::workstation libarchive 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::workstation libarchive-debuginfo 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:6::workstation libarchive-devel 0 0:2.8.3-7.el6_8
Red Hat:enterprise_linux:7::client bsdcpio 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::client bsdtar 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::client libarchive 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::client libarchive-debuginfo 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::client libarchive-devel 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::computenode bsdcpio 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::computenode bsdtar 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::computenode libarchive 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::computenode libarchive-debuginfo 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::computenode libarchive-devel 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::server bsdcpio 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::server bsdtar 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::server libarchive 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::server libarchive-debuginfo 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::server libarchive-devel 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::workstation bsdcpio 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::workstation bsdtar 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::workstation libarchive 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::workstation libarchive-debuginfo 0 0:3.1.2-10.el7_2
Red Hat:enterprise_linux:7::workstation libarchive-devel 0 0:3.1.2-10.el7_2
Red Hat:openshift:3.1::el7 atomic-openshift 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-clients 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-clients-redistributable 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-dockerregistry 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-master 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-node 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-pod 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-recycle 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 atomic-openshift-sdn-ovs 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.1::el7 tuned-profiles-atomic-openshift-node 0 0:3.1.1.7-1.git.0.65f396b.el7aos
Red Hat:openshift:3.2::el7 atomic-openshift 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-clients 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-clients-redistributable 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-dockerregistry 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-master 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-node 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-pod 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-recycle 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-sdn-ovs 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-tests 0 0:3.2.1.15-1.git.0.d84be7f.el7
Red Hat:openshift:3.2::el7 atomic-openshift-utils 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 heapster 0 0:1.1.0-1.beta2.el7.1
Red Hat:openshift:3.2::el7 openshift-ansible 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 openshift-ansible-docs 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 openshift-ansible-filter-plugins 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 openshift-ansible-lookup-plugins 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 openshift-ansible-playbooks 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 openshift-ansible-roles 0 0:3.2.28-1.git.0.5a85fc5.el7
Red Hat:openshift:3.2::el7 tuned-profiles-atomic-openshift-node 0 0:3.2.1.15-1.git.0.d84be7f.el7
SUSE:Linux Enterprise Desktop 12 SP1 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Desktop 12 SP2 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Server 12 SP1 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Server 12 SP2 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP2 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Software Development Kit 12 SP1 libarchive 0 3.1.2-25.1
SUSE:Linux Enterprise Software Development Kit 12 SP2 libarchive 0 3.1.2-25.1
Ubuntu:14.04:LTS libarchive 0 3.1.2-7ubuntu2.4
Ubuntu:16.04:LTS libarchive 0 3.1.2-11ubuntu0.16.04.3
openSUSE:Tumbleweed bsdtar 0 3.2.2-2.1

Related vulnerabilities