CVE-2021-3999

Summary

CVECVE-2021-3999
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-08-24 16:15:09 UTC
Updated2026-10-14 10:17:50 UTC
DescriptionA 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.

Risk And Classification

Primary CVSS: v3.1 7.8 HIGH from [email protected]

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Problem Types: CWE-193 | CWE-193 CWE-193 - Off-by-one Error


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary7.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1ADPDECLARED7.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary7.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Debian Debian Linux 10.0 All All All
Operating System Debian Debian Linux 11.0 All All All
Application Gnu Glibc All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na Glibc affected Fixed in glibc v2.31 and above. Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified
ADP Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP affected V3.1.0 V3.1.5 custom Not specified

References

ReferenceSourceLinkTags
cert-portal.siemens.com/productcert/html/ssa-398330.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
2024637 – (CVE-2021-3999) CVE-2021-3999 glibc: Off-by-one buffer overflow/underflow in getcwd() af854a3a-2127-422b-91ae-364da2661108 bugzilla.redhat.com Issue Tracking, Third Party Advisory
CVE-2021-3999 af854a3a-2127-422b-91ae-364da2661108 security-tracker.debian.org Third Party Advisory
sourceware.org Git - glibc.git/commit af854a3a-2127-422b-91ae-364da2661108 sourceware.org
CVE-2021-3999 GNU C Library (glibc) Vulnerability in NetApp Products | NetApp Product Security af854a3a-2127-422b-91ae-364da2661108 security.netapp.com Third Party Advisory
cert-portal.siemens.com/productcert/html/ssa-831302.html 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e cert-portal.siemens.com
oss-security - CVE-2021-3998 and CVE-2021-3999 in glibc's realpath() and getcwd() af854a3a-2127-422b-91ae-364da2661108 www.openwall.com Exploit, Mailing List, Third Party Advisory
Red Hat Customer Portal - Access to 24x7 support and knowledge af854a3a-2127-422b-91ae-364da2661108 access.redhat.com Third Party Advisory
[SECURITY] [DLA 3152-1] glibc security update af854a3a-2127-422b-91ae-364da2661108 lists.debian.org Mailing List, Third Party Advisory
28769 – (CVE-2021-3999) Off-by-one buffer overflow/underflow in getcwd() (CVE-2021-3999) af854a3a-2127-422b-91ae-364da2661108 sourceware.org Issue Tracking, Third Party Advisory
Red Hat Customer Portal - Access to 24x7 support and knowledge MITRE access.redhat.com
sourceware.org Git - glibc.git/commit MITRE sourceware.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 159715 Oracle Enterprise Linux Security Update for glibc (ELSA-2022-0896)
  • 159720 Oracle Enterprise Linux Security Update for glibc (ELSA-2022-9234)
  • 181006 Debian Security Update for glibc (CVE-2021-3999)
  • 181138 Debian Security Update for glibc (DLA 3152-1)
  • 198685 Ubuntu Security Notification for GNU C Library Vulnerabilities (USN-5310-1)
  • 240148 Red Hat Update for glibc (RHSA-2022:0896)
  • 282318 Fedora Security Update for glibc (FEDORA-2022-918e18c52c)
  • 354097 Amazon Linux Security Advisory for glibc : ALAS2-2022-1857
  • 376419 Snap-Confine Local Privilege Escalation Vulnerability (Oh Snap! More Lemmings)
  • 376580 F5 BIG-IP Application Security Manager (ASM), Local Traffic Manager (LTM), Access Policy Manager (APM) GNU C Library (glibc) Vulnerability (K24207649)
  • 591406 Siemens SIMATIC S7-1500 CPU GNU/Linux subsystem Multiple Vulnerabilities (SSB-439005, ICSA-22-104-13)
  • 671617 EulerOS Security Update for glibc (EulerOS-SA-2022-1565)
  • 671765 EulerOS Security Update for glibc (EulerOS-SA-2022-1823)
  • 671777 EulerOS Security Update for glibc (EulerOS-SA-2022-1827)
  • 671784 EulerOS Security Update for glibc (EulerOS-SA-2022-1840)
  • 671815 EulerOS Security Update for glibc (EulerOS-SA-2022-1864)
  • 672219 EulerOS Security Update for glibc (EulerOS-SA-2022-2608)
  • 710605 Gentoo Linux GNU C Library Multiple Vulnerabilities (GLSA 202208-24)
  • 751690 OpenSUSE Security Update for glibc (openSUSE-SU-2022:0330-1)
  • 751712 SUSE Enterprise Linux Security Update for glibc (SUSE-SU-2022:0441-1)
  • 751867 SUSE Enterprise Linux Security Update for glibc (SUSE-SU-2022:0832-1)
  • 751910 SUSE Enterprise Linux Security Update for glibc (SUSE-SU-2022:0909-1)
  • 751983 SUSE Enterprise Linux Security Update for glibc (SUSE-SU-2022:0330-1)
  • 753208 SUSE Enterprise Linux Security Update for glibc (SUSE-SU-2022:14923-1)
  • 903758 Common Base Linux Mariner (CBL-Mariner) Security Update for glibc (10699) (DEPRECATED)
  • 904018 Common Base Linux Mariner (CBL-Mariner) Security Update for glibc (10699-1)
  • 940469 AlmaLinux Security Update for glibc (ALSA-2022:0896)
  • 960118 Rocky Linux Security Update for glibc (RLSA-2022:896)
  • 960854 Rocky Linux Security Update for glibc (RLSA-2022:0896)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report