
CVE catalog
CVE-2021-21401
nanopb: CVE-2021-21401
- Severity
- High · CVSS 7.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 1.81% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | nanopb | sid | 0.4.9.1-2 | fixed |
| Debian | nanopb | forky | 0.4.9.1-2 | fixed |
| Debian | nanopb | trixie | 0.4.9.1-1 | fixed |
| Debian | nanopb | bookworm | 0.4.7-2 | fixed |
| Ubuntu | nanopb | pro | 0.4.1-1 | vulnerable |
| Ubuntu | nanopb | pro | 0.4.1-1ubuntu0.1~esm1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | nanopb | source | sid | 0.4.4-2 | not yet assigned | Not reported | [985844] |
| Debian | nanopb | source | forky | 0.4.4-2 | not yet assigned | Not reported | [985844] |
| Debian | nanopb | source | trixie | 0.4.4-2 | not yet assigned | Not reported | [985844] |
| Debian | nanopb | source | bookworm | 0.4.4-2 | not yet assigned | Not reported | [985844] |
| Ubuntu | nanopb | deb | pro | 0.4.1-1ubuntu0.1~esm1 | Not reported | UBUNTU-CVE-2021-21401 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [libnanopb-dev]Fixed
Source package: [nanopb]
Details (2)
0.4.7-2· amd64 · bookwormFixed · Fixed:
0.4.4-2dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12
0.4.7-2· arm64 · bookwormFixed · Fixed:
0.4.4-2dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12
- [nanopb]Fixed
Details (2)
0.4.7-2· all · bookwormFixed · Fixed:
0.4.4-2dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12
0.4.7-2· all · bookwormFixed · Fixed:
0.4.4-2dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12
[Debian 13 (Trixie)]
- [libnanopb-dev]Fixed
Source package: [nanopb]
Details (2)
0.4.9.1-1· amd64 · trixieFixed · Fixed:
0.4.4-2dsa · nanopb · debian · 13
0.4.9.1-1· arm64 · trixieFixed · Fixed:
0.4.4-2dsa · nanopb · debian · 13
- [nanopb]Fixed
Details (2)
0.4.9.1-1· all · trixieFixed · Fixed:
0.4.4-2dsa · nanopb · debian · 13
0.4.9.1-1· all · trixieFixed · Fixed:
0.4.4-2dsa · nanopb · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2024_11074-1.json]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-21401]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-21401]
- [https://security-tracker.debian.org/tracker/CVE-2021-21401]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [SUSE security advisories and VEX]