{"cve":"CVE-2020-26243","nvd":{"published":"2020-11-25T17:15:12.200","modified":"2026-06-17T03:07:54.293","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-20","CWE-119"],"references":["https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt","https://github.com/nanopb/nanopb/commit/4fe23595732b6f1254cfc11a9b8d6da900b55b0c","https://github.com/nanopb/nanopb/issues/615","https://github.com/nanopb/nanopb/security/advisories/GHSA-85rr-4rh9-hhwh","https://github.com/nanopb/nanopb/blob/2b48a361786dfb1f63d229840217a93aae064667/CHANGELOG.txt"],"products":["nanopb_project:nanopb"],"source":"nvd","synced_at":"2026-10-19T21:11:20.317016139+00:00"},"epss":{"cve":"CVE-2020-26243","score":0.02664,"percentile":0.8572,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-85rr-4rh9-hhwh","url":"https://osv.dev/vulnerability/GHSA-85rr-4rh9-hhwh","summary":"Memory leak in Nanopb","modified":"2026-07-08T06:00:09.403204538Z","packages":[{"ecosystem":"PyPI","name":"nanopb","purl":"pkg:pypi/nanopb","ranges":[">=0.3.2 <0.3.9.7"],"fixed":["0.3.9.7"]},{"ecosystem":"PyPI","name":"nanopb","purl":"pkg:pypi/nanopb","ranges":[">=0.4.0 <0.4.4"],"fixed":["0.4.4"]}]},{"id":"PYSEC-2026-684","url":"https://osv.dev/vulnerability/PYSEC-2026-684","summary":"Memory leak in Nanopb","modified":"2026-07-06T08:00:39.967579107Z","packages":[{"ecosystem":"PyPI","name":"nanopb","purl":"pkg:pypi/nanopb","ranges":[">=0.3.2 <0.3.9.7",">=0.4.0 <0.4.4"],"fixed":["0.3.9.7","0.4.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}