CVE-2021-31566: High severity oracle libarchive vulnerability
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.
Other sources
Some modes, times, ACLs and file flags especially on directories are set on archivewriteclose() time. An archive can contain multiple entries with the same path. If a directory entry is marked for post-processing and a symlink entry with the same path "replaces" the directory with the symlink, the "fixup" postprocessing may alter the link target instead of the file itself.
Reference: https://github.com/libarchive/libarchive/issues/1566
Upstream patch: https://github.com/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2021-31566?
CVE-2021-31566 is a vulnerability in the Libarchive library that allows an attacker to change the modes, times, access control lists, and flags of a file outside of an archive when it is extracted.
How does CVE-2021-31566 occur?
CVE-2021-31566 occurs due to an improper link resolution flaw in the Libarchive library.
What is the severity of CVE-2021-31566?
CVE-2021-31566 has a severity rating of high, with a CVSS score of 7.8.
Which software is affected by CVE-2021-31566?
The Libarchive library version up to exclusive 3.5.2, Fedora 35, and various versions of Redhat Enterprise Linux are affected by CVE-2021-31566.
How can I fix CVE-2021-31566?
To fix CVE-2021-31566, update the Libarchive library to version 3.5.2 or later.