
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
npm install rir-parser
Five Regional Internet Registries (AfriNIC, APNIC, ARIN, LACNIC and RIPENCC), control the assignment of IP addresses worldwide.
These RIRs publish lists (called RIR statistics) showing which addresses have been assigned, and to which country they are assigned. These lists can be obtained from several locations, including the Number Resource Organization and via FTP from ARIN and RIPE.
This module parses those lists, consolidating adjacent IPv4 ranges and returning a minimal list of IP ranges (both IPv4 and IPv6) and the country to which the range is assigned.
This module exposes one class, RirParser, which is a Node.js Transform stream.
To use it, create an instance of RirParser and pipe the list to it. The RirParser will output a series of JavaScript objects of the form:
{range: …, kind: ['ipv4'|'ipv6'], country: [two-letter country code]}
Example:
var RirParser = require('rir-parser');
var parser = new RirParser();
parser.on('readable', function() {
var ipRange;
do {
ipRange = parser.read();
if (ipRange) { console.log(ipRange); }
} while (ipRange);
});
someIncomingRirDataFileStream.pipe(parser);
FAQs
Parser for RIR Statistics Files (IP address assignment by country)
We found that rir-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.