All vulnerabilities

Servers and applications

CVE-2021-3999

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.

Severity
High 7.8
Published
24 Aug 2022
Last changed
14 Oct 2026
Added to UpHeron
1 Nov 2026
Fixed in
2.31
Sources
NVD

Affected software

SoftwareAffected versions
GNU C LibraryServers and applications · cpe:a:gnu:glibc
  • Every version before 2.31

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2021-3999
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2021-3999