Every CVE Search/ Get API key

CVE-2021-31871

An issue was discovered in klibc before 2.0.9. An integer overflow in the cpio command may result...

7.5 HighFix available

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

1.88%Up 1.0 points since Apr 30, 2021
90%50%10%1%

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 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
klibc
Alpine:v3.19
before 2.0.9-r0
2.0.9-r0
klibc
Alpine:v3.20
before 2.0.9-r0
2.0.9-r0
klibc
Alpine:v3.21
before 2.0.9-r0
2.0.9-r0
klibc
Alpine:v3.22
before 2.0.9-r0
2.0.9-r0
klibc
Alpine:v3.23
before 2.0.9-r0
2.0.9-r0
klibc
Alpine:v3.24
before 2.0.9-r0
2.0.9-r0
klibc
Debian:12
before 2.0.8-6
2.0.8-6
klibc
Debian:13
before 2.0.8-6
2.0.8-6
klibc
Debian:14
before 2.0.8-6
2.0.8-6
klibc
Debian: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
Affected packages
PackageAffectedFixed
klibc
Ubuntu: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
klibc
Ubuntu: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 less
2.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
klibc
Ubuntu:18.04:LTS
before 2.0.4-9ubuntu2.1, plus listed versions
2.0.4-9ubuntu12.0.4-9ubuntu2
2.0.4-9ubuntu2.1
klibc
Ubuntu: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
klibc
Ubuntu: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
klibc
Ubuntu: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 less
2.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
klibc
Ubuntu: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
klibc
Ubuntu: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

History
RecordedChangedSources
affected, facts
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE 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

Show 9 moreShow less
MoveEnter Open