CVE-2020-26243
published high CVSS 3.1 · 7.5Memory leak in nanopb
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| nanopb | — | nanopb< 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 Nanopb before versions 0.4.4 and 0.3.9.7, decoding specifically formed message can leak memory if dynamic allocation is enabled and an oneof field contains a static submessage that contains a dynamic field, and the message being decoded contains the submessage multiple times. This is rare in normal messages, but it is a concern when untrusted data is parsed. This is fixed in versions 0.3.9.7 and 0.4.4. The following workarounds are available: 1) Set the option `no_unions` for the oneof field. This will generate fields as separate instead of C union, and avoids triggering the problematic code. 2) Set the type of the submessage field inside oneof to `FT_POINTER`. This way the whole submessage will be dynamically allocated and the problematic code is not executed. 3) Use an arena allocator for nanopb, to make sure all memory can be released afterwards.
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.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| nanopb | nanopb | < 0.3.9.7 (affected)>= 0.4.0, < 0.4.4 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-20 CWE-20: Improper Input Validation
- CWE-119 CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
References
4Provider assertions
2GitHub_M · cna
Memory leak in nanopb
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 62eee12675ea3965ad0793a7f041d456afc0fe82358d3e4e49a9ab6733320cf7
- Ingested
- 23 Sep 2026, 07:49:46 UTC
- Source record
- Official CVE record