CVE-2021-31871
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result...
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
CVE-2021-31871- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-190
- Updated
- 2026-11-02
CVE List No score
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
CVE-2021-31871- Updated
- 2026-11-02
EUVDEUVD-2021-18746 No score
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
EUVD-2021-18746- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-xhrj-7pjg-g5cf
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result...
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
GHSA-xhrj-7pjg-g5cf- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-190
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-31871
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
ALPINE-CVE-2021-31871- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSV
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
CVE-2021-31871- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-31871
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
DEBIAN-CVE-2021-31871- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-31871
7.5
An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result in a NULL pointer dereference on 64-bit systems.
- Record
UBUNTU-CVE-2021-31871- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUSN-5379-1 No score
klibc vulnerabilities
It was discovered that klibc did not properly perform some mathematical operations, leading to an integer overflow. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-31870)
It was discovered that klibc did not properly handled some memory allocations on 64 bit systems. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-31871)
It was discovered that klibc did not properly handled some file sizes values on 32 bit systems. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-31872)
It was discovered that klibc did not properly handled some memory allocations. An attacker could possibly use this issue to cause a crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-31873)
- Record
USN-5379-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
klibcAlpine:v3.19 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcAlpine:v3.20 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcAlpine:v3.21 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcAlpine:v3.22 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcAlpine:v3.23 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcAlpine:v3.24 |
before 2.0.9-r0 | 2.0.9-r0 |
klibcDebian:12 |
before 2.0.8-6 | 2.0.8-6 |
klibcDebian:13 |
before 2.0.8-6 | 2.0.8-6 |
klibcDebian:14 |
before 2.0.8-6 | 2.0.8-6 |
klibcDebian:9 From an advisory covering 4 CVEs |
before 2.0.4-9+deb9u1, plus listed versions 2.0.4-9 |
2.0.4-9+deb9u1 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
klibcUbuntu:Pro:14.04:LTS |
before 2.0.3-0ubuntu1.14.04.3+esm2, plus listed versions 2.0.1-3.1ubuntu22.0.2-1ubuntu12.0.2-1ubuntu22.0.3-0ubuntu12.0.3-0ubuntu1.14.04.12.0.3-0ubuntu1.14.04.22.0.3-0ubuntu1.14.04.3 |
2.0.3-0ubuntu1.14.04.3+esm2 |
klibcUbuntu:Pro:16.04:LTS |
before 2.0.4-8ubuntu1.16.04.4+esm1, plus listed versions 2.0.3-0ubuntu12.0.4-42.0.4-62.0.4-72.0.4-8 Show 5 moreShow less2.0.4-8ubuntu12.0.4-8ubuntu1.16.04.12.0.4-8ubuntu1.16.04.22.0.4-8ubuntu1.16.04.32.0.4-8ubuntu1.16.04.4 |
2.0.4-8ubuntu1.16.04.4+esm1 |
klibcUbuntu:18.04:LTS |
before 2.0.4-9ubuntu2.1, plus listed versions 2.0.4-9ubuntu12.0.4-9ubuntu2 |
2.0.4-9ubuntu2.1 |
klibcUbuntu:20.04:LTS |
before 2.0.7-1ubuntu5.1, plus listed versions 2.0.6-1ubuntu12.0.6-1ubuntu22.0.7-1ubuntu12.0.7-1ubuntu32.0.7-1ubuntu42.0.7-1ubuntu5 |
2.0.7-1ubuntu5.1 |
klibcUbuntu:Pro:14.04:LTS From an advisory covering 4 CVEs |
before 2.0.3-0ubuntu1.14.04.3+esm2, plus listed versions 2.0.1-3.1ubuntu22.0.2-1ubuntu12.0.2-1ubuntu22.0.3-0ubuntu12.0.3-0ubuntu1.14.04.12.0.3-0ubuntu1.14.04.22.0.3-0ubuntu1.14.04.3 |
2.0.3-0ubuntu1.14.04.3+esm2 |
klibcUbuntu:Pro:16.04:LTS From an advisory covering 4 CVEs |
before 2.0.4-8ubuntu1.16.04.4+esm1, plus listed versions 2.0.3-0ubuntu12.0.4-42.0.4-62.0.4-72.0.4-8 Show 5 moreShow less2.0.4-8ubuntu12.0.4-8ubuntu1.16.04.12.0.4-8ubuntu1.16.04.22.0.4-8ubuntu1.16.04.32.0.4-8ubuntu1.16.04.4 |
2.0.4-8ubuntu1.16.04.4+esm1 |
klibcUbuntu:18.04:LTS From an advisory covering 4 CVEs |
before 2.0.4-9ubuntu2.1, plus listed versions 2.0.4-9ubuntu12.0.4-9ubuntu2 |
2.0.4-9ubuntu2.1 |
klibcUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 2.0.7-1ubuntu5.1, plus listed versions 2.0.6-1ubuntu12.0.6-1ubuntu22.0.7-1ubuntu12.0.7-1ubuntu32.0.7-1ubuntu42.0.7-1ubuntu5 |
2.0.7-1ubuntu5.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-31871 is a high vulnerability (CVSS 7.5) in Klibc Project Klibc, published April 30, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.88%, the 79th percentile. Fixed in klibc 2.0.9-r0.
References
kernel.org/pub/linux/libs/klibc/2.0
lists.zytor.com/archives/klibc/2021-April/004593.html
git.kernel.org/pub/scm/libs/klibc/klibc.git/commit?id=2e48a12ab1e30d43498c2d53e878a11a1b5102d5
openwall.com/lists/oss-security/2021/04/30/1
lists.debian.org/debian-lts-announce/2021/06/msg00025.html
nvd.nist.gov/vuln/detail/CVE-2021-31871
Show 9 moreShow less
github.com/advisories/GHSA-xhrj-7pjg-g5cf
security.alpinelinux.org/vuln/CVE-2021-31871
security-tracker.debian.org/tracker/CVE-2021-31871
ubuntu.com/security/CVE-2021-31871
ubuntu.com/security/notices/USN-5379-1
cve.org/CVERecord?id=CVE-2021-31871
ubuntu.com/security/CVE-2021-31870
ubuntu.com/security/CVE-2021-31872
ubuntu.com/security/CVE-2021-31873