CVE catalog

CVE-2021-21401

nanopb: CVE-2021-21401

[CVE catalog]

Severity
High · CVSS 7.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
Published
Source
[NVD] · [CVE record]
EPSS
1.81% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiannanopbsid0.4.9.1-2fixed
Debiannanopbforky0.4.9.1-2fixed
Debiannanopbtrixie0.4.9.1-1fixed
Debiannanopbbookworm0.4.7-2fixed
Ubuntunanopbpro0.4.1-1vulnerable
Ubuntunanopbpro0.4.1-1ubuntu0.1~esm1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannanopbsourcesid0.4.4-2not yet assignedNot reported[985844]
Debiannanopbsourceforky0.4.4-2not yet assignedNot reported[985844]
Debiannanopbsourcetrixie0.4.4-2not yet assignedNot reported[985844]
Debiannanopbsourcebookworm0.4.4-2not yet assignedNot reported[985844]
Ubuntunanopbdebpro0.4.1-1ubuntu0.1~esm1Not reportedUBUNTU-CVE-2021-21401Not reported

[Debian bug #985844]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [nanopb]

    Details (2)
    • 0.4.7-2 · amd64 · bookworm

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12

    • 0.4.7-2 · arm64 · bookworm

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12

  • [nanopb]Fixed
    Details (2)
    • 0.4.7-2 · all · bookworm

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12

    • 0.4.7-2 · all · bookworm

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · bookworm; dsa · nanopb · debian · 12

[Debian 13 (Trixie)]

  • Source package: [nanopb]

    Details (2)
    • 0.4.9.1-1 · amd64 · trixie

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · 13

    • 0.4.9.1-1 · arm64 · trixie

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · 13

  • [nanopb]Fixed
    Details (2)
    • 0.4.9.1-1 · all · trixie

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · 13

    • 0.4.9.1-1 · all · trixie

      Fixed · Fixed: 0.4.4-2

      dsa · nanopb · debian · 13

Observed:

References