GHSA-7mv5-5mxh-qg88 · Severity: high · Ecosystem: pip — nanopb vulnerable to invalid free() call with oneofs and PB_ENABLE_MALLOC
Nanopb is a small code-size Protocol Buffers implementation in ansi C. In Nanopb before versions 0.3.9.8 and 0.4.5, decoding a specifically formed message can cause invalid `free()` or `realloc()` calls if the message type contains an `oneof` field, and the `oneof` directly contains both a pointer field and a non-pointer field. If the message data first contains the non-pointer field and then the pointer field, the data of the non-pointer field is incorrectly treated as if it was a pointer value. Such message data rarely occurs in normal messages, but it is a concern when untrusted data is parsed. This has been fixed in versions 0.3.9.8 and 0.4.5. See referenced GitHub Security Advisory for more information including workarounds.
Conclusion & alert: CVE-2021-21401 is rated High Exploit Risk (70.9/100): CVSS High severity, with medium exploitation likelihood (EPSS 1.81%). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
| EDB-ID | Source | Kind | Published | Link |
|---|---|---|---|---|
| — | nvd_ref | exploit_tag | Exploit-DB ↗ | |
| — | nvd_ref | exploit_tag | Exploit-DB ↗ |
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.84% | 1.81% | +0.97% |
| 2 | 2026-06-01 | 0.20% | 0.84% | +0.64% |
| 3 | 2025-11-21 | — | 0.20% | — |
Full EPSS history (18 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 7.1 | 3.1 | HIGH |
|
2.8 | 4.2 | [email protected] |
| 7.1 | 3.1 | HIGH |
|
2.8 | 4.2 | [email protected] |
| 5.5 | 2.0 | MEDIUM |
|
8.0 | 4.9 | [email protected] |
GHSA-7mv5-5mxh-qg88 · Severity: high · Ecosystem: pip — nanopb vulnerable to invalid free() call with oneofs and PB_ENABLE_MALLOC
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
not yet assigned | CVE-2021-21401 not yet assigned priority: Debian including 1 source packages (nanopb), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. | https://security-tracker.debian.org/tracker/CVE-2021-21401 |
ubuntu
|
medium | CVE-2021-21401 medium priority: Ubuntu including 1 source packages (nanopb), 15 status rows across 15 suites (bionic, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, trusty, upstream, xenial): not-affected 7, DNE 3, ignored 3, released 2. | https://ubuntu.com/security/CVE-2021-21401 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| nanopb_project | nanopb | < 0.3.9.8 | cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:* |
| nanopb_project | nanopb | >= 0.4.0, < 0.4.5 | cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:* |
| URL | Tags |
|---|---|
| https://github.com/nanopb/nanopb/blob/c9124132a604047d0ef97a09c0e99cd9bed2c818/CHANGELOG.txt#L1 | Release Notes Third Party Advisory |
| https://github.com/nanopb/nanopb/commit/e2f0ccf939d9f82931d085acb6df8e9a182a4261 | Patch Third Party Advisory |
| https://github.com/nanopb/nanopb/issues/647 | Exploit Issue Tracking Third Party Advisory |
| https://github.com/nanopb/nanopb/security/advisories/GHSA-7mv5-5mxh-qg88 | Exploit Patch Third Party Advisory |