CVE-2021-21401
published high CVSS 3.1 · 7.1Invalid free() call in Nanopb
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nanopb | — | nanopb>= 0.3.2, <= 0.3.9.7 · >= 0.4.0, <= 0.4.4 | Affected | Not stated | GitHub_M |
| Ubuntu | focal | nanopb | Advisory build | 0.4.1-1ubuntu0.1~esm1 | USN-6121-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libprotobuf-nanopb0aarch64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libprotobuf-nanopb0ppc64le | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libprotobuf-nanopb0s390x | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | libprotobuf-nanopb0x86_64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-develaarch64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-develppc64le | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
Show 6 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-devels390x | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-develx86_64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-sourceaarch64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-sourceppc64le | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-sources390x | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | nanopb-sourcex86_64 | Advisory build | 0.4.5-1.3 | OPENSUSE-SU-2024:11074-1 |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nanopb | nanopb | >= 0.3.2, <= 0.3.9.7 (affected)>= 0.4.0, <= 0.4.4 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-763 CWE-763: Release of Invalid Pointer or Reference
References
4Provider assertions
2GitHub_M · cna
Invalid free() call in Nanopb
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 03dec0a1e0c25a77cd45c53205e56bed951777acc1e3c8ecdef35d0204d7b721
- Ingested
- 23 Sep 2026, 07:52:31 UTC
- Source record
- Official CVE record