libarchive — security advisory
Libarchive through 3.6.2 can cause directories to have world-writable permissions. The umask() call inside archive_write_disk_posix.c changes the umask of the whole process for a very short period of time; a race condition with another thread can lead to a permanent umask 0 setting. Such a race condition could lead to implicit directory creation with permissions 0777 (without the sticky bit), which means that any low-privileged local user can delete and rename files inside those directories.
- Products
- libarchive
- Affected versions
- 3.1.2-11build1, 3.1.2-11ubuntu0.16.04.1, 3.1.2-11ubuntu0.16.04.2, 3.1.2-11ubuntu0.16.04.3, 3.1.2-11ubuntu0.16.04.4, 3.1.2-11ubuntu0.16.04.5, 3.1.2-11ubuntu0.16.04.6, 3.1.2-11ubuntu0.16.04.7, 3.1.2-11ubuntu0.16.04.8, 3.1.2-11ubuntu0.16.04.8+esm1, 3.1.2-11ubuntu0.16.04.8+esm2, 3.1.2-11ubuntu0.16.04.8+esm3, 3.1.2-5ubuntu1, 3.1.2-7ubuntu1, 3.1.2-7ubuntu2, 3.1.2-7ubuntu2.1, 3.1.2-7ubuntu2.2, 3.1.2-7ubuntu2.3, 3.1.2-7ubuntu2.4, 3.1.2-7ubuntu2.6, 3.1.2-7ubuntu2.7, 3.1.2-7ubuntu2.8, 3.1.2-7ubuntu2.8+esm1, 3.1.2-7ubuntu2.8+esm3, 3.1.2-7ubuntu2.8+esm4, 3.1.2-7ubuntu2.8+esm5, 3.2.2-3.1, 3.2.2-3.1ubuntu0.1, 3.2.2-3.1ubuntu0.2, 3.2.2-3.1ubuntu0.3, 3.2.2-3.1ubuntu0.4, 3.2.2-3.1ubuntu0.5, 3.2.2-3.1ubuntu0.6, 3.2.2-3.1ubuntu0.7, 3.2.2-3.1ubuntu0.7+esm1, 3.2.2-3.1ubuntu0.7+esm2, 3.2.2-3.1ubuntu0.7+esm3, 3.4.0-1, 3.4.0-1build1, 3.4.0-1ubuntu2, 3.4.0-2ubuntu1, 3.4.0-2ubuntu1.1, 3.4.0-2ubuntu1.2, 3.4.0-2ubuntu1.3, 3.4.0-2ubuntu1.4, 3.4.0-2ubuntu1.5, 3.4.0-2ubuntu1.5+esm1, 3.4.0-2ubuntu1.5+esm2, 3.4.0-2ubuntu1.5+esm3, 3.4.3-2, 3.4.3-2build1, 3.5.2-1, 3.5.2-1ubuntu1, 3.6.0-1ubuntu1, 3.6.0-1ubuntu1.1, 3.6.0-1ubuntu1.2, 3.6.0-1ubuntu1.3, 3.6.0-1ubuntu1.4, 3.6.0-1ubuntu1.5, 3.6.0-1ubuntu1.6, 3.6.0-1ubuntu1.7, 3.6.0-1ubuntu1.8, 3.6.0-1ubuntu1.9
- Fixed versions
- Not specified
- CVEs
- CVE-2023-30571
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 10:03 UTC · Revision 1
Source evidence
Libarchive through 3.6.2 can cause directories to have world-writable permissions. The umask() call inside archive_write_disk_posix.c changes the umask of the whole process for a very short period of time; a race condition with another thread can lead to a permanent umask 0 setting. Such a race condition could lead to implicit directory creation with permissions 0777 (without the sticky bit), which means that any low-privileged local user can delete and rename files inside those directories.
osv:UBUNTU-CVE-2023-30571
libarchive
Fixed versions: Not specified
libarchive
Fixed versions: Not specified
libarchive
Fixed versions: Not specified
libarchive
Fixed versions: Not specified
libarchive
Fixed versions: Not specified
Complete source record
{
"id": "19fe6aa57c7d3c1b17d73445be98348d46324b84db37f8162de74a9b17d86ff1",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2023-30571",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2023-30571",
"summary": "Libarchive through 3.6.2 can cause directories to have world-writable permissions. The umask() call inside archive_write_disk_posix.c changes the umask of the whole process for a very short period of time; a race condition with another thread can lead to a permanent umask 0 setting. Such a race condition could lead to implicit directory creation with permissions 0777 (without the sticky bit), which means that any low-privileged local user can delete and rename files inside those directories.",
"evidence": "osv:UBUNTU-CVE-2023-30571",
"products": [
{
"name": {
"value": "libarchive",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.2-5ubuntu1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.2",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.3",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.4",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.6",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.7",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.8",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.8+esm1",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.8+esm3",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.8+esm4",
"evidence": "/affected/0/versions"
},
{
"value": "3.1.2-7ubuntu2.8+esm5",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "libarchive",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.2-11build1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.2",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.3",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.4",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.5",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.6",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.7",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.8",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.8+esm1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.8+esm2",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.2-11ubuntu0.16.04.8+esm3",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "libarchive",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.2.2-3.1",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.1",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.2",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.3",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.4",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.5",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.6",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.7",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.7+esm1",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.7+esm2",
"evidence": "/affected/2/versions"
},
{
"value": "3.2.2-3.1ubuntu0.7+esm3",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "libarchive",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.4.0-1",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-1build1",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-1ubuntu2",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.1",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.2",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.3",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.4",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.5",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.5+esm1",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.5+esm2",
"evidence": "/affected/3/versions"
},
{
"value": "3.4.0-2ubuntu1.5+esm3",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "libarchive",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.4.3-2",
"evidence": "/affected/4/versions"
},
{
"value": "3.4.3-2build1",
"evidence": "/affected/4/versions"
},
{
"value": "3.5.2-1",
"evidence": "/affected/4/versions"
},
{
"value": "3.5.2-1ubuntu1",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.1",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.2",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.3",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.4",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.5",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.6",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.7",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.8",
"evidence": "/affected/4/versions"
},
{
"value": "3.6.0-1ubuntu1.9",
"evidence": "/affected/4/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "UBUNTU-CVE-2023-30571",
"aliases": [
"UBUNTU-CVE-2023-30571"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "negligible"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libarchive",
"purl": "pkg:deb/ubuntu/libarchive?arch=source&distro=esm-infra-legacy%2Ftrusty",
"ecosystem": "Ubuntu:Pro:14.04:LTS"
},
"versions": [
"3.1.2-5ubuntu1",
"3.1.2-7ubuntu1",
"3.1.2-7ubuntu2",
"3.1.2-7ubuntu2.1",
"3.1.2-7ubuntu2.2",
"3.1.2-7ubuntu2.3",
"3.1.2-7ubuntu2.4",
"3.1.2-7ubuntu2.6",
"3.1.2-7ubuntu2.7",
"3.1.2-7ubuntu2.8",
"3.1.2-7ubuntu2.8+esm1",
"3.1.2-7ubuntu2.8+esm3",
"3.1.2-7ubuntu2.8+esm4",
"3.1.2-7ubuntu2.8+esm5"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30571.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "bsdcpio",
"binary_version": "3.1.2-7ubuntu2.8+esm5"
},
{
"binary_name": "bsdtar",
"binary_version": "3.1.2-7ubuntu2.8+esm5"
},
{
"binary_name": "libarchive13",
"binary_version": "3.1.2-7ubuntu2.8+esm5"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libarchive",
"purl": "pkg:deb/ubuntu/libarchive?arch=source&distro=esm-infra-legacy%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"versions": [
"3.1.2-11build1",
"3.1.2-11ubuntu0.16.04.1",
"3.1.2-11ubuntu0.16.04.2",
"3.1.2-11ubuntu0.16.04.3",
"3.1.2-11ubuntu0.16.04.4",
"3.1.2-11ubuntu0.16.04.5",
"3.1.2-11ubuntu0.16.04.6",
"3.1.2-11ubuntu0.16.04.7",
"3.1.2-11ubuntu0.16.04.8",
"3.1.2-11ubuntu0.16.04.8+esm1",
"3.1.2-11ubuntu0.16.04.8+esm2",
"3.1.2-11ubuntu0.16.04.8+esm3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30571.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "bsdcpio",
"binary_version": "3.1.2-11ubuntu0.16.04.8+esm3"
},
{
"binary_name": "bsdtar",
"binary_version": "3.1.2-11ubuntu0.16.04.8+esm3"
},
{
"binary_name": "libarchive13",
"binary_version": "3.1.2-11ubuntu0.16.04.8+esm3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libarchive",
"purl": "pkg:deb/ubuntu/libarchive?arch=source&distro=esm-infra%2Fbionic",
"ecosystem": "Ubuntu:Pro:18.04:LTS"
},
"versions": [
"3.2.2-3.1",
"3.2.2-3.1ubuntu0.1",
"3.2.2-3.1ubuntu0.2",
"3.2.2-3.1ubuntu0.3",
"3.2.2-3.1ubuntu0.4",
"3.2.2-3.1ubuntu0.5",
"3.2.2-3.1ubuntu0.6",
"3.2.2-3.1ubuntu0.7",
"3.2.2-3.1ubuntu0.7+esm1",
"3.2.2-3.1ubuntu0.7+esm2",
"3.2.2-3.1ubuntu0.7+esm3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30571.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "bsdcpio",
"binary_version": "3.2.2-3.1ubuntu0.7+esm3"
},
{
"binary_name": "bsdtar",
"binary_version": "3.2.2-3.1ubuntu0.7+esm3"
},
{
"binary_name": "libarchive-tools",
"binary_version": "3.2.2-3.1ubuntu0.7+esm3"
},
{
"binary_name": "libarchive13",
"binary_version": "3.2.2-3.1ubuntu0.7+esm3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libarchive",
"purl": "pkg:deb/ubuntu/libarchive?arch=source&distro=esm-infra%2Ffocal",
"ecosystem": "Ubuntu:Pro:20.04:LTS"
},
"versions": [
"3.4.0-1",
"3.4.0-1build1",
"3.4.0-1ubuntu2",
"3.4.0-2ubuntu1",
"3.4.0-2ubuntu1.1",
"3.4.0-2ubuntu1.2",
"3.4.0-2ubuntu1.3",
"3.4.0-2ubuntu1.4",
"3.4.0-2ubuntu1.5",
"3.4.0-2ubuntu1.5+esm1",
"3.4.0-2ubuntu1.5+esm2",
"3.4.0-2ubuntu1.5+esm3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30571.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libarchive-tools",
"binary_version": "3.4.0-2ubuntu1.5+esm3"
},
{
"binary_name": "libarchive13",
"binary_version": "3.4.0-2ubuntu1.5+esm3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "libarchive",
"purl": "pkg:deb/ubuntu/libarchive?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"3.4.3-2",
"3.4.3-2build1",
"3.5.2-1",
"3.5.2-1ubuntu1",
"3.6.0-1ubuntu1",
"3.6.0-1ubuntu1.1",
"3.6.0-1ubuntu1.2",
"3.6.0-1ubuntu1.3",
"3.6.0-1ubuntu1.4",
"3.6.0-1ubuntu1.5",
"3.6.0-1ubuntu1.6",
"3.6.0-1ubuntu1.7",
"3.6.0-1ubuntu1.8",
"3.6.0-1ubuntu1.9"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-30571.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libarchive-tools",
"binary_version": "3.6.0-1ubuntu1.9"
},
{
"binary_name": "libarchive13",
"binary_version": "3.6.0-1ubuntu1.9"
}
]
}
}
],
"modified": "2026-10-08T19:46:18.810715496Z",
"provider": "osv",
"upstream": [
"CVE-2023-30571"
],
"references": [
"https://ubuntu.com/security/CVE-2023-30571",
"https://www.cve.org/CVERecord?id=CVE-2023-30571"
]
},
"related_cves": [
{
"value": "CVE-2023-30571",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 104500,
"published_at": "2023-05-29T20:15:00+00:00"
}