{"id":"CVE-2021-3999","revision":"9f52d21411da4143b23a176435efdc2f","records":[{"revision":"9f52d21411da4143b23a176435efdc2f","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2021-3999","aliases":[],"title":"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 se…","description":"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 setuid program could use this flaw to potentially execute arbitrary code and escalate their privileges on the system.","state":0,"publishedAt":"2022-08-24T00:00:00+00:00","modifiedAt":"2026-10-14T09:59:03.285+00:00","affected":[{"ecosystem":"Vendor product","name":"glibc","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"n/a\",\n                    \"product\": \"glibc\",\n                    \"versions\": [\n                        {\n                            \"version\": \"Fixed in glibc v2.31 and above.\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://www.openwall.com/lists/oss-security/2022/01/24/4","https://sourceware.org/bugzilla/show_bug.cgi?id=28769","https://sourceware.org/git/gitweb.cgi?p=glibc.git%3Bh=23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e","https://bugzilla.redhat.com/show_bug.cgi?id=2024637","https://access.redhat.com/security/cve/CVE-2021-3999","https://security-tracker.debian.org/tracker/CVE-2021-3999","https://lists.debian.org/debian-lts-announce/2022/10/msg00021.html","https://security.netapp.com/advisory/ntap-20221104-0001/"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2021-3999","license":"CVE Program Terms of Use","key":"cve-program:CVE-2021-3999","identifiers":["CVE-2021-3999"]},"retained":false,"historicalAffected":[]}],"coverage":[]}