<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ip-Address (&lt;= 10.3.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/ip-address--10.3.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 03 Aug 2026 20:48:07 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/ip-address--10.3.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>SSRF via Ambiguous IPv4 Parsing in ip-address Library</title><link>https://feed.craftedsignal.io/briefs/2026-08-ip-address-ssrf/</link><pubDate>Mon, 03 Aug 2026 20:48:07 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-08-ip-address-ssrf/</guid><description>The ip-address library versions 10.3.0 and below incorrectly parse IPv4 addresses with leading zeros, leading to trust-boundary bypasses and SSRF when used to filter internal network access.</description><content:encoded><![CDATA[<p>The ip-address npm package (versions 10.3.0 and below) contains a critical flaw in its IPv4 parsing logic that creates an address-classification discrepancy between the application-layer guard and the underlying network resolver. The library's <code>Address4.parse</code> logic uses a regular expression that permits octets with leading zeros, which it then decodes as decimal. However, standard network resolvers and the WHATWG URL host parser interpret such leading-zero octets as octal (base 8).</p>
<p>This discrepancy allows an attacker to bypass security filters built on top of this library. For example, the host '012.0.0.1' is classified by the library as a public/external address, but when passed to a network utility or <code>fetch</code> request, the OS resolver interprets it as '10.0.0.1', a private RFC 1918 address. Applications relying on this library to validate URLs or block SSRF (Server-Side Request Forgery) will fail to detect these obfuscated internal addresses, allowing malicious requests to reach restricted internal infrastructure, such as management interfaces or metadata services.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a target application utilizing the ip-address library to perform SSRF filtering or trust-boundary validation.</li>
<li>Attacker crafts an IPv4 address string using octal-ambiguous notation (e.g., '012.0.0.1') corresponding to a sensitive internal resource.</li>
<li>The application passes this string to <code>new Address4(host)</code> for security validation.</li>
<li><code>Address4</code> validates the string as a non-private IPv4 address (or a non-loopback address) because it treats the leading zero as a decimal identifier.</li>
<li>The application security logic concludes the host is safe (not internal) and permits the request.</li>
<li>The application subsequently passes the untrusted string to a native URL parser or network request library (e.g., <code>fetch</code>, <code>axios</code>).</li>
<li>The network resolver interprets the leading zero as octal, resolving the address to an internal target (e.g., 10.0.0.1).</li>
<li>The final network request is dispatched to the prohibited internal destination, resulting in successful SSRF.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in SSRF, allowing attackers to access internal-only services, cloud metadata endpoints, or local network resources that are shielded from the public internet. This bypass is effective because the obfuscation technique is compatible with standard URL parsing and network stacks, requiring no specialized tooling. The vulnerability affects any application that relies on <code>ip-address</code> to block internal IP ranges without performing secondary host resolution and socket-level verification.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Upgrade the <code>ip-address</code> package to a patched version immediately.</li>
<li>If an immediate upgrade is not possible, implement an input filter that rejects any host whose octets contain a leading zero before passing it to the library: <code>if (host.split('.').some((octet) =&gt; /^0\d/.test(octet))) throw new Error('ambiguous address');</code>.</li>
<li>Ensure that all SSRF guards are implemented as multi-layered defenses. Do not rely solely on parsing libraries; perform actual DNS resolution of hostnames and validate the resolved IP against an allowed-list before establishing a socket connection.</li>
<li>Ensure security checks account for DNS rebinding and redirects, as static address validation is insufficient to prevent all SSRF scenarios.</li>
</ol>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssrf</category><category>library-vulnerability</category><category>supply-chain</category></item></channel></rss>