VDB

CVE-2021-3999

CVE-2021-3999 PUBLISHED CVSS 7.8 HIGH

Reported by redhat · Published August 24, 2022

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
glibc-langpack-kokAmazon Linux2.26-61.amzn2
glibcArch Linux2.34-1
glibc-langpack-sgsAmazon Linux2.26-61.amzn2
glibc-langpack-tlAmazon Linux2.26-61.amzn2
glibc-langpack-cyAmazon Linux2.26-61.amzn2
glibc-langpack-koAmazon Linux2.26-61.amzn2
glibc-langpack-ttAmazon Linux2.26-61.amzn2
glibc-langpack-hiAmazon Linux2.26-61.amzn2
glibc-langpack-cvAmazon Linux2.26-61.amzn2
glibc-langpack-cmnAmazon Linux2.26-61.amzn2
glibc-langpack-lbAmazon Linux2.26-61.amzn2
glibc-langpack-mnAmazon Linux2.26-61.amzn2

19 more packages have a fixed version. See every fix in Lookup.

Risk scores

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

Affected products

VendorProductVersions
n/aglibcFixed in glibc v2.31 and above.
amazon:2glibc-langpack-kok0
archglibc0
amazon:2glibc-langpack-sgs0
amazon:2glibc-langpack-tl0
amazon:2glibc-langpack-cy0
amazon:2glibc-langpack-ko0
amazon:2glibc-langpack-tt0
amazon:2glibc-langpack-hi0
amazon:2glibc-langpack-cv0
amazon:2glibc-langpack-cmn0
amazon:2glibc-langpack-lb0
amazon:2glibc-langpack-mn0
amazon:2glibc-langpack-raj0
amazon:2libcrypt0
amazon:2glibc-langpack-yi0
amazon:2glibc-benchtests0
amazon:2glibc-langpack-fy0
amazon:2glibc-langpack-the0
amazon:2glibc-langpack-sq0

…and 185 more

Timeline

  • Jan 24, 2022 CVE Published
  • Aug 25, 2022 EPSS Score (30 in total, the first dated here)
  • Apr 3, 2025 PoC Published (2 in total, the first dated here)
  • Jan 25, 2026 CVE Updated
  • Mar 17, 2026 Distribution Patch (6 in total, the first dated here)
  • Mar 17, 2026 Security Advisory (9 in total, the first dated here)
  • Jul 22, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-3999
vulnetix vdb fixes CVE-2021-3999

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-3999/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›