Integer Overflow or Wraparound Affecting newlib package, versions *


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
2.1% (80th 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 IDSNYK-UBUNTU1804-NEWLIB-1122481
  • published26 Feb 2026
  • disclosed5 Mar 2021

Introduced: 5 Mar 2021

CVE-2021-3420  (opens in a new tab)
CWE-190  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

There is no fixed version for Ubuntu:18.04 newlib.

NVD Description

Note: Versions mentioned in the description apply only to the upstream newlib package and not the newlib package as distributed by Ubuntu. See How to fix? for Ubuntu:18.04 relevant fixed versions and status.

A flaw was found in newlib in versions prior to 4.0.0. Improper overflow validation in the memory allocation functions mEMALIGn, pvALLOc, nano_memalign, nano_valloc, nano_pvalloc could case an integer overflow, leading to an allocation of a small buffer and then to a heap-based buffer overflow.

CVSS Base Scores

version 3.1