Out-of-bounds Read Affecting nanopb/nanopb package, versions [,0.2.9.4)[0.3.0,0.3.9.5)[0.4.0,0.4.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
1.73% (75th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Out-of-bounds Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-NANOPBNANOPB-2333576
  • published12 Jan 2022
  • disclosed4 Feb 2020
  • creditUnknown

Introduced: 4 Feb 2020

CVE-2020-5235  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade nanopb/nanopb to version 0.2.9.4, 0.3.9.5, 0.4.1 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read. 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.

CVSS Base Scores

version 3.1