High
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-31566
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:43 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-31566
Complete source record
{
"id": "0ad9176de3a073be14c504ec6c5260e82048b1688063c06c52c3b63dff93bf37",
"url": "https://osv.dev/vulnerability/CVE-2021-31566",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-31566",
"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.",
"evidence": "osv:CVE-2021-31566",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-31566",
"aliases": [
"CVE-2021-31566"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/libarchive/libarchive",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "1b2c437b99b361c7692538fa373e99955e9b93ae"
},
{
"fixed": "b41daecb5ccb4c8e3b2c53fd6147109fc12c3043"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:libarchive:libarchive:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.5.2"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "b41daecb5ccb4c8e3b2c53fd6147109fc12c3043"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"v3.5.1",
"v3.5.0",
"v3.4.3",
"v3.4.2",
"v3.4.1",
"v3.4.0",
"v3.3.3",
"v3.3.2",
"v3.3.1",
"v3.3.0",
"v3.2.2",
"v3.2.1",
"v3.2.0",
"v3.1.900a",
"v3.0.1b",
"v3.0.0a"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-31566.json",
"vanir_signatures": [
{
"id": "CVE-2021-31566-0834228a",
"digest": {
"length": 392,
"function_hash": "320885234252780684570698584660020445109"
},
"source": "https://github.com/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043",
"target": {
"file": "libarchive/archive_write_disk_posix.c",
"function": "new_fixup"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-31566-ac5c5a7f",
"digest": {
"length": 1519,
"function_hash": "110734215287798123614942951414182550419"
},
"source": "https://github.com/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043",
"target": {
"file": "libarchive/archive_write_disk_posix.c",
"function": "_archive_write_disk_close"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2021-31566-d6100c6d",
"digest": {
"threshold": 0.9,
"line_hashes": [
"334213001812460528018391827159886250604",
"298298676331893685508912404895218376082",
"281934148289165203262543037398505981918",
"133516452297774702506059862221571155387",
"255221266610567971253350916651381886473",
"170682487718179720080081239390752149260",
"170025671853692686754571705056591065980",
"45037131218959646499624916514381153602",
"186193754164664539686045318506423310731",
"225543418414766849505237414068380309124",
"86909181518846551630439248081499842741",
"204079521770618757456484582354817443455",
"186196365260791091821237758044867926710",
"177454630852752040839969091402436254366",
"19420843327646963772774605998605845839",
"293067094968881452369372668079840711572",
"203792904399839432760890263818080987312",
"5073500280348788259073985801637204843",
"56277685507538684435295851773380652368",
"144927451397420683091458932258143307900"
]
},
"source": "https://github.com/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043",
"target": {
"file": "libarchive/archive_write_disk_posix.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:21:53Z"
}
}
],
"modified": "2026-10-20T14:21:53.643700466Z",
"provider": "osv",
"references": [
"https://access.redhat.com/security/cve/CVE-2021-31566",
"https://lists.debian.org/debian-lts-announce/2022/11/msg00030.html",
"https://bugzilla.redhat.com/show_bug.cgi?id=2024237",
"https://github.com/libarchive/libarchive/commit/b41daecb5ccb4c8e3b2c53fd6147109fc12c3043",
"https://github.com/libarchive/libarchive/issues/1566"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:splunk:universal_forwarder:*:*:*:*:*:*:*:*"
],
"vendor_product": "splunk:universal_forwarder",
"extracted_events": [
{
"range": [
{
"introduced": "8.2.0"
},
{
"fixed": "8.2.12"
},
{
"introduced": "9.0.0"
},
{
"fixed": "9.0.6"
}
],
"source": "CPE_RANGE"
}
]
},
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "10.0"
},
{
"last_affected": "10.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
],
"vendor_product": "fedoraproject:fedora",
"extracted_events": [
{
"range": [
{
"introduced": "35"
},
{
"last_affected": "35"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_eus:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_ibm_z_systems",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_ibm_z_systems_eus:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_ibm_z_systems_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian:8.0:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_power_little_endian",
"extracted_events": [
{
"range": [
{
"introduced": "8.0"
},
{
"last_affected": "8.0"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_for_power_little_endian_eus:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_for_power_little_endian_eus",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_aus:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_aus",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_for_power_little_endian_update_services_for_sap_solutions:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_for_power_little_endian_update_services_for_sap_solutions",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:redhat:enterprise_linux_server_tus:8.6:*:*:*:*:*:*:*"
],
"vendor_product": "redhat:enterprise_linux_server_tus",
"extracted_events": [
{
"range": [
{
"introduced": "8.6"
},
{
"last_affected": "8.6"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:a:splunk:universal_forwarder:9.1.0:*:*:*:*:*:*:*"
],
"vendor_product": "splunk:universal_forwarder",
"extracted_events": [
{
"range": [
{
"introduced": "9.1.0"
},
{
"last_affected": "9.1.0"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-31566",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388833,
"published_at": "2022-08-23T16:15:09.337+00:00"
}