{"id":"CVE-2021-3999","title":"A flaw was found in glibc","summary":"A flaw was found in glibc. An off-by-one buffer overflow and underflow in getcwd() may lead to memory corruption when the size of the buffer is exactly 1. A local attacker who can control the input buffer and size passed to getcwd() in a…","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cwe":["CWE-193","CWE-193"],"vendor":"gnu","product":"glibc","affected":["glibc < 2.31","debian_linux = 10.0","debian_linux = 11.0","e-series_performance_analyzer","nfs_plug-in","ontap_select_deploy_administration_utility","h300s_firmware","h500s_firmware","h700s_firmware","h410s_firmware","h410c_firmware"],"patched":["glibc 2.31"],"published":"2022-08-24","updated":"2026-10-14","sourceUpdated":"2026-10-14T10:17:50.007","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2021-3999","references":[{"url":"https://access.redhat.com/security/cve/CVE-2021-3999","label":"secalert@redhat.com"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2024637","label":"secalert@redhat.com"},{"url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00021.html","label":"secalert@redhat.com"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-3999","label":"secalert@redhat.com"},{"url":"https://security.netapp.com/advisory/ntap-20221104-0001/","label":"secalert@redhat.com"},{"url":"https://sourceware.org/bugzilla/show_bug.cgi?id=28769","label":"secalert@redhat.com"},{"url":"https://sourceware.org/git/gitweb.cgi?p=glibc.git%3Bh=23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e","label":"secalert@redhat.com"},{"url":"https://www.openwall.com/lists/oss-security/2022/01/24/4","label":"secalert@redhat.com"},{"url":"https://access.redhat.com/security/cve/CVE-2021-3999","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2024637","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2022/10/msg00021.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-3999","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.netapp.com/advisory/ntap-20221104-0001/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://sourceware.org/bugzilla/show_bug.cgi?id=28769","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://sourceware.org/git/gitweb.cgi?p=glibc.git%3Bh=23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.openwall.com/lists/oss-security/2022/01/24/4","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-831302.html","label":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e"}],"tags":["nvd"],"epss":0.00746,"epssPercentile":0.53596,"ingestedAt":"2026-10-14T10:25:41.194Z","slug":"CVE-2021-3999","body":"## Overview\n\nA flaw was found in glibc. An off-by-one buffer overflow and underflow in getcwd() may lead to memory corruption when the size of the buffer is exactly 1. A local attacker who can control the input buffer and size passed to getcwd() in a setuid program could use this flaw to potentially execute arbitrary code and escalate their privileges on the system.\n\n## Affected\n\n- `glibc < 2.31`\n- `debian_linux = 10.0`\n- `debian_linux = 11.0`\n- `e-series_performance_analyzer`\n- `nfs_plug-in`\n- `ontap_select_deploy_administration_utility`\n- `h300s_firmware`\n- `h500s_firmware`\n- `h700s_firmware`\n- `h410s_firmware`\n- `h410c_firmware`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `glibc 2.31`","depth":"twilight","depthScore":43,"depthScoreParts":{"impact":42.9,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}