Security advisory
There is an open race window when writing output in the following utilities in GNU binutils version 2.35 and earlier:ar, objcopy, strip, ranlib. When these utilities are run as a privileged user (presumably as part of a script updating binaries across different users), an unprivileged user can trick these utilities into getting ownership of arbitrary files through a symlink.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-20197
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 08:21 UTC · Revision 1
Source evidence
There is an open race window when writing output in the following utilities in GNU binutils version 2.35 and earlier:ar, objcopy, strip, ranlib. When these utilities are run as a privileged user (presumably as part of a script updating binaries across different users), an unprivileged user can trick these utilities into getting ownership of arbitrary files through a symlink.
osv:CVE-2021-20197
Complete source record
{
"id": "a7bc0adfafc3ef50e127af7f8f5c3a6ab5f053cc79ce585b189623ab360f8961",
"url": "https://osv.dev/vulnerability/CVE-2021-20197",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-20197",
"summary": "There is an open race window when writing output in the following utilities in GNU binutils version 2.35 and earlier:ar, objcopy, strip, ranlib. When these utilities are run as a privileged user (presumably as part of a script updating binaries across different users), an unprivileged user can trick these utilities into getting ownership of arbitrary files through a symlink.",
"evidence": "osv:CVE-2021-20197",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-20197",
"aliases": [
"CVE-2021-20197"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://sourceware.org/git/binutils-gdb.git",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "2cb5c79dad39dd438fb0f7372ac04cf5aa2a7db7"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:gnu:binutils:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "2.35"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"binutils-2_35",
"gdb-9-branchpoint",
"gdb-8.3-branchpoint",
"users/ARM/embedded-gdb-master-2018q4",
"users/ARM/embedded-binutils-master-2018q4",
"gdb-8.2-branchpoint",
"gdb-8.1-branchpoint",
"users/ARM/embedded-gdb-master-2017q4",
"users/ARM/embedded-binutils-master-2017q4",
"gdb-8.0-branchpoint",
"users/ARM/embedded-binutils-master-2016q4",
"gdb-7.12-branchpoint",
"gdb-7.11-branchpoint",
"gdb-7.10-branchpoint",
"gdb-7.9-branchpoint",
"gdb-7.8-branchpoint",
"gdb-7.7-branchpoint",
"gdb_7_6-branchpoint",
"gdb_7_5-branchpoint",
"gdb_7_4-branchpoint",
"gdb_7_3-branchpoint",
"gdb_7_2-branchpoint",
"gdb_7_1-branchpoint",
"gdb_7_0-branchpoint",
"gdb_6_8-branchpoint",
"gdb_6_7-branchpoint",
"gdb_6_6-branchpoint",
"gdb_6_5-branchpoint",
"gdb_6_4-branchpoint",
"gdb_6_3-branchpoint",
"gdb_6_2-branchpoint",
"gdb_6_1-branchpoint",
"gdb_6_0-branchpoint",
"gdb_5_3-branchpoint",
"gdb_5_2-branchpoint",
"gdb-4_18-branchpoint"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-20197.json"
}
}
],
"modified": "2026-10-24T10:31:06.260114893Z",
"provider": "osv",
"references": [
"https://security.gentoo.org/glsa/202208-30",
"https://security.netapp.com/advisory/ntap-20210528-0009/",
"https://bugzilla.redhat.com/show_bug.cgi?id=1913743",
"https://sourceware.org/bugzilla/show_bug.cgi?id=26945"
],
"provider_metadata": {
"unresolved_ranges": [
{
"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"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-20197",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 440948,
"published_at": "2021-03-26T17:15:12.92+00:00"
}