cve.bz

CVE-2020-26243 nanopb project nanopb: Improper Input Validation

7.5 highExploit referenceEPSS 2.7%Fix available

High (7.5) in nanopb project nanopb. EPSS 2.7% estimated probability of exploitation activity in the next 30 days. Fixed in nanopb 0.3.9.7, 0.4.4.

On this page
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.

Severity

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
EPSS
2.7% (unchanged from 2.7% a week ago; 2.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 86th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-20 Improper Input Validation
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2020-26243 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2020-26243?via=ask-ai-copy and https://cve.bz/cve/CVE-2020-26243?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2020-26243 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nanopb_project:nanopbbefore 0.3.9.7
nanopb_project:nanopbfrom 0.4.0 before 0.4.4

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-85rr-4rh9-hhwhPyPInanopb>=0.3.2 <0.3.9.70.3.9.7
GHSA-85rr-4rh9-hhwhPyPInanopb>=0.4.0 <0.4.40.4.4
PYSEC-2026-684PyPInanopb>=0.3.2 <0.3.9.7
>=0.4.0 <0.4.4
0.3.9.7, 0.4.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14nanopb0.4.4-1DEBIAN-CVE-2020-26243
UbuntuPro:20.04:LTSnanopb0.4.1-1ubuntu0.1~esm1UBUNTU-CVE-2020-26243 USN-6121-1
openSUSETumbleweednanopb0.4.5-1.3openSUSE-SU-2024:11074-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

OpenShift ServiceMesh (OSSM) packages a vulnerable version of nanopb in the RPM servicemesh-proxy, however it does not define PB_ENABLE_MALLOC and hence the code in pb_release_union_field is never reached. As such, OSSM is deemed to be of Moderate impact and marked wontfix at this time although it may be fixed in a future update.

ProductPackageStateAdvisory
OpenShift Service Mesh 1servicemesh-proxyWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2020-26243.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-119 (12), CWE-20 (51).

References

Check your stackJSON