CVE-2020-26243
Memory leak in nanopb
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
Memory leak in nanopb
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.
- Record
CVE-2020-26243- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-119
- Updated
- 2026-11-02
EUVDEUVD-2020-1450
7.5
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.
- Record
EUVD-2020-1450- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-85rr-4rh9-hhwh
7.5
Memory leak in Nanopb
Impact
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.
Patches
Preliminary patch is available on git and problem will be patched in versions 0.3.9.7 and 0.4.4 once testing has been completed.
Workarounds
Following workarounds are available:
- Set the option
no_unionsfor the oneof field. This will generate fields as separate instead of C union, and avoids triggering the problematic code. - 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. - Use an arena allocator for nanopb, to make sure all memory can be released afterwards.
References
Bug report: https://github.com/nanopb/nanopb/issues/615
For more information
If you have any questions or comments about this advisory, comment on the bug report linked above.
- Record
GHSA-85rr-4rh9-hhwh- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-20, CWE-119
- Updated
- 2026-11-02
NVD
7.5
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.
- Record
CVE-2020-26243- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:N/A:P - Weakness
- CWE-20, CWE-119
- Updated
- 2026-11-02
OSV
7.5
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.
- Record
CVE-2020-26243- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2020-26243
7.5
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.
- Record
DEBIAN-CVE-2020-26243- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-85rr-4rh9-hhwh
7.5
Memory leak in Nanopb
Impact
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.
Patches
Preliminary patch is available on git and problem will be patched in versions 0.3.9.7 and 0.4.4 once testing has been completed.
Workarounds
Following workarounds are available:
- Set the option
no_unionsfor the oneof field. This will generate fields as separate instead of C union, and avoids triggering the problematic code. - 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. - Use an arena allocator for nanopb, to make sure all memory can be released afterwards.
References
Bug report: https://github.com/nanopb/nanopb/issues/615
For more information
If you have any questions or comments about this advisory, comment on the bug report linked above.
- Record
GHSA-85rr-4rh9-hhwh- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-119, CWE-20
- Updated
- 2026-11-02
OSVPYSEC-2026-684
7.5
Memory leak in Nanopb
Impact
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.
Patches
Preliminary patch is available on git and problem will be patched in versions 0.3.9.7 and 0.4.4 once testing has been completed.
Workarounds
Following workarounds are available:
- Set the option
no_unionsfor the oneof field. This will generate fields as separate instead of C union, and avoids triggering the problematic code. - 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. - Use an arena allocator for nanopb, to make sure all memory can be released afterwards.
References
Bug report: https://github.com/nanopb/nanopb/issues/615
For more information
If you have any questions or comments about this advisory, comment on the bug report linked above.
- Record
PYSEC-2026-684- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2020-26243
7.5
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.
- Record
UBUNTU-CVE-2020-26243- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11074-1 No score
libprotobuf-nanopb0-0.4.5-1.3 on GA media
These are all security issues fixed in the libprotobuf-nanopb0-0.4.5-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11074-1- Updated
- 2026-11-02
OSVUSN-6121-1 No score
nanopb vulnerabilities
It was discovered that Nanopb incorrectly handled certain decode messages. An attacker could possibly use this cause a denial of service or expose sensitive information. (CVE-2020-26243)
It was discovered that Nanopb incorrectly handled certain decode messages. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-21401)
- Record
USN-6121-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nanopbPyPI |
0.3.2 to 0.3.9.6 | 0.3.9.7 |
nanopbPyPI |
0.4.0 up to 0.4.4 | 0.4.4 |
nanopbDebian:12 |
before 0.4.4-1 | 0.4.4-1 |
nanopbDebian:13 |
before 0.4.4-1 | 0.4.4-1 |
nanopbDebian:14 |
before 0.4.4-1 | 0.4.4-1 |
nanopbPyPI |
0.3.2 up to 0.3.9.7, plus listed versions 0.3.9.4.post30.3.9.50.3.9.6 |
0.3.9.7 |
nanopbPyPI |
0.4.0 up to 0.4.4, plus listed versions 0.4.10.4.1.dev10030.4.1.dev10070.4.1.dev10120.4.1.dev1013 Show 45 moreShow less0.4.1.dev10170.4.1.dev10360.4.1.dev9590.4.1.dev9610.4.1.dev9620.4.1.dev9640.4.1.dev9710.4.1.dev9780.4.1.dev9800.4.1.dev9850.4.1.dev9870.4.1.dev9880.4.1.dev9960.4.1.dev9970.4.20.4.2.dev10410.4.2.dev10430.4.2.dev10440.4.2.dev10450.4.2.dev10480.4.2.dev10500.4.2.dev10530.4.2.dev10540.4.2.dev10550.4.2.dev10580.4.2.dev10590.4.2.dev10630.4.2.dev10660.4.2.dev10700.4.2.dev10710.4.2.dev10720.4.2.dev10760.4.2.dev10880.4.2.dev10910.4.30.4.3.dev11280.4.3.dev11310.4.3.dev11320.4.3.dev11330.4.3.dev11370.4.3.dev11500.4.3.dev11640.4.3.dev11720.4.3.dev11750.4.3.dev1177 |
0.4.4 |
nanopbPyPI |
0.3.2 up to 0.3.9.7, 0.4.0 up to 0.4.4, plus listed versions 0.3.9.4.post30.3.9.50.3.9.60.4.10.4.1.dev1003 Show 45 moreShow less0.4.1.dev10070.4.1.dev10120.4.1.dev10130.4.1.dev10170.4.1.dev10360.4.1.dev9590.4.1.dev9610.4.1.dev9620.4.1.dev9640.4.1.dev9710.4.1.dev9780.4.1.dev9800.4.1.dev9850.4.1.dev9870.4.1.dev9880.4.1.dev9960.4.1.dev9970.4.20.4.2.dev10410.4.2.dev10430.4.2.dev10440.4.2.dev10450.4.2.dev10480.4.2.dev10500.4.2.dev10530.4.2.dev10540.4.2.dev10550.4.2.dev10580.4.2.dev10590.4.2.dev10630.4.2.dev10660.4.2.dev10700.4.2.dev10710.4.2.dev10720.4.2.dev10760.4.2.dev10880.4.2.dev10910.4.30.4.3.dev11280.4.3.dev11310.4.3.dev11320.4.3.dev11330.4.3.dev11370.4.3.dev11500.4.3.dev1164 |
0.3.9.70.4.4 |
nanopbUbuntu:Pro:20.04:LTS |
before 0.4.1-1ubuntu0.1~esm1, plus listed versions 0.4.1-1 |
0.4.1-1ubuntu0.1~esm1 |
nanopbUbuntu:Pro:20.04:LTS From an advisory covering 2 CVEs |
before 0.4.1-1ubuntu0.1~esm1, plus listed versions 0.4.1-1 |
0.4.1-1ubuntu0.1~esm1 |
nanopbopenSUSE:Tumbleweed From an advisory covering 3 CVEs |
before 0.4.5-1.3 | 0.4.5-1.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2020-26243 is a high vulnerability (CVSS 7.5) in Nanopb, published November 25, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.66%, the 85th percentile. Fixed in nanopb 0.3.9.7.
References
github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh
github.com/nanopb/nanopb/issues/615
github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c
github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt
nvd.nist.gov/vuln/detail/CVE-2020-26243
github.com/advisories/GHSA-85rr-4rh9-hhwh
Show 10 moreShow less
security-tracker.debian.org/tracker/CVE-2020-26243
pypi.org/project/nanopb
ubuntu.com/security/CVE-2020-26243
github.com/nanopb/nanopb/commit/edf6dcbffee4d614ac0c2c1b258ab95185bdb6e9
ubuntu.com/security/notices/USN-6121-1
cve.org/CVERecord?id=CVE-2020-26243
ubuntu.com/security/CVE-2021-21401
suse.com/security/cve/CVE-2020-26243
suse.com/security/cve/CVE-2020-5235
suse.com/security/cve/CVE-2021-21401
Left out here: 17 versions. The JSON record has them.