CVE-2020-28360: npm private-ip SSRF Bypass (IP Phone Home)
The npm private-ip library, used to block requests to internal addresses, could be bypassed so that a server-side request forgery filter let requests reach internal hosts. An attacker could use a crafted address to get past the block and reach internal services.
johnjhacking.com
Published on johnjhacking.com
Versions of npm private-ip including and prior to 1.0.5 are vulnerable to multiple Server Side Request Forgery (SSRF) bypasses. Implemented Regular Expression (RegEx) within the package fail to account for variations of localhost and other Private IP ranges.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the private-ip library's address parsing did not correctly recognise certain address formats as private, so its check returned the wrong answer.
Impact
An attacker could bypass the SSRF blocking and reach internal addresses the filter was meant to stop.
What the attacker needed
A server that uses private-ip for SSRF filtering
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A server-side request forgery (SSRF) bug lets an attacker make a server fetch a web address of the attacker's choosing, including internal ones. This report is about a small helper library that was supposed to spot internal addresses and refuse them, but a crafted address slipped past its check.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.