Live threats

All CVEs / Nanopb Project

CVE-2020-26243Nanopb Project Nanopb

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
2.7%
probability of exploitation in 30 days · percentile 86
Auth required
No
Published
Nov 25, 2020
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-20, CWE-119
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Nanopb.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI nanopb ≥ 0.3.2 < 0.3.9.7 0.3.9.7 pip install "nanopb>=0.3.9.7"
PyPI nanopb ≥ 0.4.0 < 0.4.4 0.4.4 pip install "nanopb>=0.4.4"
PyPI nanopb ≥ 0.3.2 < 0.3.9.7 0.3.9.7 pip install "nanopb>=0.3.9.7"
PyPI nanopb ≥ 0.4.0 < 0.4.4 0.4.4 pip install "nanopb>=0.4.4"

Per OSV / GitHub Advisories (GHSA-85rr-4rh9-hhwh, PYSEC-2026-684). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
nanopb_projectnanopb< 0.3.9.7
nanopb_projectnanopb≥ 0.4.0 < 0.4.4

Official sources

References

Links published by the sources. Open them with care.