7.1
HIGH
CVE-2021-21401
Nanopb Oneof Pointer Corruption Remote Code Execution
Description

Nanopb is a small code-size Protocol Buffers implementation in ansi C. In Nanopb before versions 0.3.9.8 and 0.4.5, decoding a specifically formed message can cause invalid `free()` or `realloc()` calls if the message type contains an `oneof` field, and the `oneof` directly contains both a pointer field and a non-pointer field. If the message data first contains the non-pointer field and then the pointer field, the data of the non-pointer field is incorrectly treated as if it was a pointer value. Such message data rarely occurs in normal messages, but it is a concern when untrusted data is parsed. This has been fixed in versions 0.3.9.8 and 0.4.5. See referenced GitHub Security Advisory for more information including workarounds.

INFO

Published Date :

March 23, 2021, 6:15 p.m.

Last Modified :

March 29, 2021, 2:50 p.m.

Remotely Exploitable :

Yes !

Impact Score :

4.2

Exploitability Score :

2.8
Affected Products

The following products are affected by CVE-2021-21401 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Nanopb_project nanopb
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2021-21401.

URL Resource
https://github.com/nanopb/nanopb/blob/c9124132a604047d0ef97a09c0e99cd9bed2c818/CHANGELOG.txt#L1 Release Notes Third Party Advisory
https://github.com/nanopb/nanopb/commit/e2f0ccf939d9f82931d085acb6df8e9a182a4261 Patch Third Party Advisory
https://github.com/nanopb/nanopb/issues/647 Exploit Issue Tracking Third Party Advisory
https://github.com/nanopb/nanopb/security/advisories/GHSA-7mv5-5mxh-qg88 Exploit Patch Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-21401 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-21401 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • Initial Analysis by [email protected]

    Mar. 29, 2021

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:S/C:N/I:P/A:P)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
    Changed Reference Type https://github.com/nanopb/nanopb/blob/c9124132a604047d0ef97a09c0e99cd9bed2c818/CHANGELOG.txt#L1 No Types Assigned https://github.com/nanopb/nanopb/blob/c9124132a604047d0ef97a09c0e99cd9bed2c818/CHANGELOG.txt#L1 Release Notes, Third Party Advisory
    Changed Reference Type https://github.com/nanopb/nanopb/commit/e2f0ccf939d9f82931d085acb6df8e9a182a4261 No Types Assigned https://github.com/nanopb/nanopb/commit/e2f0ccf939d9f82931d085acb6df8e9a182a4261 Patch, Third Party Advisory
    Changed Reference Type https://github.com/nanopb/nanopb/issues/647 No Types Assigned https://github.com/nanopb/nanopb/issues/647 Exploit, Issue Tracking, Third Party Advisory
    Changed Reference Type https://github.com/nanopb/nanopb/security/advisories/GHSA-7mv5-5mxh-qg88 No Types Assigned https://github.com/nanopb/nanopb/security/advisories/GHSA-7mv5-5mxh-qg88 Exploit, Patch, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:* versions up to (excluding) 0.3.9.8 *cpe:2.3:a:nanopb_project:nanopb:*:*:*:*:*:*:*:* versions from (including) 0.4.0 up to (excluding) 0.4.5
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-21401 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-21401 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.17 }} 0.04%

score

0.52208

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability