Skip to content
Fencer Vulns
medium 6.5

CVE-2021-45940 json

libbpf 0.6.0 and 0.6.1 has a heap-based buffer overflow (4 bytes) in __bpf_object__open (called from bpf_object__open_mem and bpf-object-fu…

published 2021-12-31 4 y ago modified 2026-06-17 4 mo ago also BIT-bpftool-2021-45940 , EUVD-2021-32649

cvss
6.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.3%
EPSS 1.3% chance of exploitation in 30 days, percentile 69%
public exploits
0
none known

Summary

libbpf 0.6.0 and 0.6.1 has a heap-based buffer overflow (4 bytes) in __bpf_object__open (called from bpf_object__open_mem and bpf-object-fuzzer.c).

Patch / fix

  • libbpf Debian 14, Debian 13, Debian 12 0.7.0-2

debian advisories DEBIAN-CVE-2021-45940

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-45940 updated cvss 4.5

libbpf: heap-based buffer overflow (4 bytes) in __bpf_object__open

  • Red Hat Enterprise Linux 8 libbpf
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux 9 libbpf
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.25% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/google/oss-fuzz-vulns/blob/main/vulns/libbpf/OSV-2021-1562.yaml referenced PoC, tagged "exploit" by a source, unverified
  • bugs.chromium.org https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40868 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P
OSV 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
bitnami bpftool
>=0.6.0, <=0.6.0
>=0.6.1, <=0.6.1
no fix listed

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.