• News/
  • https://www.bleepingcomputer.com/news/security/critical-netmask-networking-bug-impacts-thousands-of-applications/

Critical netmask networking bug impacts thousands of applications

BleepingComputer
·
Published Mar 28, 2021
·
Updated

Popular npm library netmask has a critical networking vulnerability. netmask is frequently used by hundreds of thousands of applications to parse IPv4 addresses and CIDR blocks or compare them. The component gets over 3 million weekly downloads, and as of today, has scored over 238 million total downloads over its lifetime. Further, about 278,000 GitHub repositories depend on netmask. The bug present in the library means when parsing an IP address with a leading zero, netmask sees a different IP due to improper validations in place. Today, security researchers Victor Viale, Sick Codes, Nick Sahler, Kelly Kaoudis, and John Jackson have disclosed a flaw in the popular netmask library. The vulnerability, tracked as CVE-2021-28918 and more recently as CVE-2021-29418, concerns how netmask handles mixed-format IP addresses, or more specifically when a decimal IPv4 address contains a leading zero. An IP address can be represented in a variety of formats, including hexadecimal and integer, although most commonly seen IPv4 addresses are expressed in decimal format. For example, BleepingComputer's IPv4 address represented in decimal format is 104.20.59.209, but the same can be expressed in the octal format as, 0150.0024.0073.0321. Say you are given an IP address in decimal format, 127.0.0.1, which is widely understood as the local loopback address or localhost. If you were to prefix a 0 to it, should an application still parse 0127.0.0.1 as 127.0.0.1 or something else? Try this in you...

Read full article

Affected Software

1 affected component
npm netmask>=2.0.1

Frequently Asked Questions

1

What is the main topic of this article?

The article discusses a critical networking vulnerability found in the npm library netmask.

2

What security implications are discussed in the article?

The vulnerability in netmask poses risks to thousands of applications that utilize it for parsing IPv4 addresses and CIDR blocks.

3

How widely is the netmask library used?

Netmask is used by hundreds of thousands of applications and receives over 3 million downloads weekly.

4

What specific versions of software are affected by this vulnerability?

The vulnerability impacts the npm library netmask itself rather than specific software versions.

5

What should developers do in response to this netmask vulnerability?

Developers should patch their applications by updating to a secure version of the netmask library.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203