CVE-2020-26243
Python vulnerability analysis and mitigation

Overview

Nanopb, a small code-size Protocol Buffers implementation, disclosed a vulnerability (CVE-2020-26243) affecting versions before 0.4.4 and 0.3.9.7. The vulnerability was discovered and reported on November 24, 2020, and fixed in versions 0.3.9.7 and 0.4.4 released on November 25, 2020. The issue affects systems where dynamic allocation is enabled and specific message structures containing oneof fields are used (GitHub Advisory).

Technical details

The vulnerability occurs when decoding specifically formed messages with PB_ENABLE_MALLOC enabled. The issue manifests when an oneof field contains a static submessage that contains a dynamic field, and the message being decoded contains the submessage multiple times. The bug was caused by pb_release_union_field detecting duplicate submessages but not properly handling memory management, leading to a memory leak. The issue received a CVSS v3.1 score of 7.5 HIGH (NVD).

Impact

When exploited, the vulnerability results in memory leaks when parsing maliciously crafted messages. The impact increases with the number of duplicate fields in the message, with each duplicate potentially causing additional memory leaks. For example, certain test cases showed that specific message patterns could leak 4 bytes, and larger patterns could leak 8 bytes or more (GitHub Issue).

Mitigation and workarounds

Three workarounds were provided: 1) Set the option 'no_unions' for the oneof field to generate fields as separate instead of C union, 2) Set the type of the submessage field inside oneof to 'FT_POINTER' to ensure dynamic allocation of the whole submessage, 3) Use an arena allocator for nanopb to ensure all memory can be released afterwards. The permanent fix was implemented in versions 0.3.9.7 and 0.4.4 (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-70646HIGH7.5
  • Python logoPython
  • aiosend
NoYesAug 06, 2026
CVE-2026-71554MEDIUM5.3
  • Python logoPython
  • python-h2
NoYesAug 06, 2026
CVE-2026-71433MEDIUM5.3
  • Python logoPython
  • langgraph-checkpoint-postgres
NoYesAug 06, 2026
CVE-2026-61632MEDIUM5.3
  • Python logoPython
  • pymdown-extensions
NoYesAug 06, 2026
CVE-2026-64640MEDIUM5.3
  • Python logoPython
  • polaris
NoYesAug 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management