CVE-2021-3999
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| glibc-langpack-kok | Amazon Linux | 2.26-61.amzn2 |
| glibc | Arch Linux | 2.34-1 |
| glibc-langpack-sgs | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-tl | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-cy | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-ko | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-tt | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-hi | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-cv | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-cmn | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-lb | Amazon Linux | 2.26-61.amzn2 |
| glibc-langpack-mn | Amazon Linux | 2.26-61.amzn2 |
19 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | glibc | Fixed in glibc v2.31 and above. |
| amazon:2 | glibc-langpack-kok | 0 |
| arch | glibc | 0 |
| amazon:2 | glibc-langpack-sgs | 0 |
| amazon:2 | glibc-langpack-tl | 0 |
| amazon:2 | glibc-langpack-cy | 0 |
| amazon:2 | glibc-langpack-ko | 0 |
| amazon:2 | glibc-langpack-tt | 0 |
| amazon:2 | glibc-langpack-hi | 0 |
| amazon:2 | glibc-langpack-cv | 0 |
| amazon:2 | glibc-langpack-cmn | 0 |
| amazon:2 | glibc-langpack-lb | 0 |
| amazon:2 | glibc-langpack-mn | 0 |
| amazon:2 | glibc-langpack-raj | 0 |
| amazon:2 | libcrypt | 0 |
| amazon:2 | glibc-langpack-yi | 0 |
| amazon:2 | glibc-benchtests | 0 |
| amazon:2 | glibc-langpack-fy | 0 |
| amazon:2 | glibc-langpack-the | 0 |
| amazon:2 | glibc-langpack-sq | 0 |
…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