CVE-2021-31566 json
An improper link resolution flaw can occur while extracting an archive leading to changing modes,...
published 4y ago modified 7d ago also EUVD-2021-18460 , JLSEC-2025-236
- cvss
- 7.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
An improper link resolution flaw can occur while extracting an archive leading to changing modes, times, access control lists, and flags of a file outside of the archive. An attacker may provide a malicious archive to a victim user, who would trigger this flaw when trying to extract the archive. A local attacker may use this flaw to gain more privileges in a system.
Patch / fix
- julia LibArchive_jll 3.5.2+0
- libarchive libarchive 3.5.2
- splunk universal_forwarder 8.2.12, 9.0.6
- libarchive Debian 14, Debian 13, Debian 12 3.5.2-1
debian advisories DEBIAN-CVE-2021-31566
- libarchive Ubuntu 20.04 LTS 3.4.0-2ubuntu1.1
ubuntu advisories UBUNTU-CVE-2021-31566
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- libarchive RHEL 8 3.3.3-3.el8_5
- bsdtar RHEL 8 3.3.3-3.el8_5
red hat advisories RHSA-2022:0892
- libarchive SLE Module for Development Tools 15 SP4, SLE Module for Basesystem 15 SP4, SLE Micro 5.3 +1 more 3.5.1-150400.3.9.1
- libarchive SLE Module for Development Tools 15 SP3, SLE Module for Basesystem 15 SP3, openSUSE Leap 15.3 3.4.2-150200.4.12.1
suse advisories SUSE-SU-2022:3936-1SUSE-SU-2022:3935-1
- bsdtar openSUSE Tumbleweed 3.6.0-1.1
opensuse advisories openSUSE-SU-2024:11894-1
- libarchive AlmaLinux 8 3.3.3-3.el8_5
- bsdtar AlmaLinux 8 3.3.3-3.el8_5
almalinux advisories ALSA-2022:0892
- libarchive Rocky Linux 8 3.3.3-3.el8_5
rocky linux advisories RLSA-2022:0892
- libarchive Alpine 3.14, Alpine 3.13 3.5.3-r0
alpine advisories ALPINE-CVE-2021-31566
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2021-31566 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-31566 updated cvss 7.1
libarchive: symbolic links incorrectly followed when changing modes, times, ACL and flags of a file while extracting an archive
-
Red Hat Enterprise Linux 6 libarchive Red Hat Enterprise Linux 7 bsdtar, bsdcpio, libarchiveaffected: no fix planned “Out of support scope”
-
Red Hat CodeReady Linux Builder (v. 8) bsdcat-debuginfo 3.3.3-3.el8_5, bsdtar-debuginfo 3.3.3-3.el8_5, libarchive-devel 3.3.3-3.el8_5, bsdcpio-debuginfo 3.3.3-3.el8_5, libarchive-debuginfo 3.3.3-3.el8_5, libarchive-debugsource 3.3.3-3.el8_5 Red Hat Enterprise Linux BaseOS (v. 8) bsdtar 3.3.3-3.el8_5, libarchive 3.3.3-3.el8_5fixed: vendor fix RHSA-2022:0892
-
Red Hat Enterprise Linux 9 bsdtar, libarchivenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 7d ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| OSV | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| julia | LibArchive_jll | <3.5.2+0 |
3.5.2+0 |
Affected products
- n/a libarchive
Classification
- Weakness
-
- CWE-59 Improper Link Resolution Before File Access
References
-
github.com
/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043
patch, third-party-advisory, web
-
github.com
/libarchive/libarchive/issues/1566
issue-tracking, patch, third-party-advisory, web
-
bugzilla.redhat.com
/show_bug.cgi?id=2024237
issue-tracking, patch, third-party-advisory, web
-
access.redhat.com
/security/cve/CVE-2021-31566
third-party-advisory, web
-
lists.debian.org
/debian-lts-announce/2022/11/msg00030.html
mailing-list, third-party-advisory, web
Sources
- CVE List CVE-2021-31566
- NVD CVE-2021-31566
- OSV JLSEC-2025-236
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.