CVE-2020-5235

Out-of-memory condition in Nanopb is potentially exploitable

CRITICAL
9.8
CVSS Score
Published: February 4, 2020 at 03:00 AM UTC
Updated: June 17, 2026 at 03:21 AM UTC
1 product affected across 1 vendorNanopb

Using Nanopb by nanopb?

Get instant alerts when new vulnerabilities affect Nanopb - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
CRITICAL9.8
Exploit prediction
EPSS 2%

Description

There is a potentially exploitable out of memory condition In Nanopb before 0.4.1, 0.3.9.5, and 0.2.9.4. When nanopb is compiled with PB_ENABLE_MALLOC, the message to be decoded contains a repeated string, bytes or message field and realloc() runs out of memory when expanding the array nanopb can end up calling `free()` on a pointer value that comes from uninitialized memory. Depending on platform this can result in a crash or further memory corruption, which may be exploitable in some cases. This problem is fixed in nanopb-0.4.1, nanopb-0.3.9.5, nanopb-0.2.9.4.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.2.9.4v < 0.3.9.5v < 0.4.10.3.0 ≤ v < 0.3.9.50.4.0 ≤ v < 0.4.1
Affected range stops below 0.2.9.4, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.3.9.5, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.4.1, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-125

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card