Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-101912 Overview
CVE-2026-101912 affects the ip-address JavaScript library, a package used to parse and manipulate IPv4 and IPv6 addresses. Versions prior to 10.7.1 contain an incorrect comparison flaw [CWE-697] in the isInSubnet and isHostInSubnet methods within src/common.ts. The methods compare masked binary strings without validating that both operands belong to the same IP family. When the leading bits of an IPv4 address coincide with those of an IPv6 address, the masked comparison returns true even though the two addresses occupy separate address spaces. Applications using these methods for allowlist or denylist decisions can misclassify addresses as being inside the intended range.
Critical Impact
Cross-family subnet checks can bypass Server-Side Request Forgery (SSRF) filters and other trust-boundary controls that rely on isInSubnet or isHostInSubnet.
Affected Products
- ip-address npm package versions prior to 10.7.1
- JavaScript and TypeScript applications using isInSubnet for allow/deny decisions
- Applications using isHostInSubnet on untrusted address inputs
Discovery Timeline
- 2026-09-28 - CVE-2026-101912 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-101912
Vulnerability Analysis
The flaw lies in how the library evaluates subnet containment. The mask() function returns a bit string sized to the address family width: 32 bits for IPv4 and 128 bits for IPv6. The vulnerable code compares two masked strings using strict equality without confirming that both come from the same family. When the leading bits align, the shorter IPv4 mask matches the corresponding prefix of an IPv6 mask, producing a false positive.
An Address4 compared against an Address6 should always be classified as not contained, because IPv4 and IPv6 do not share an address space. The library shipped no such guard prior to version 10.7.1. Any consumer relying on the return value for a trust decision inherited the flaw.
The CWE-697 classification reflects an incorrect comparison rather than a memory-safety issue. Impact is bounded to integrity of the containment decision. Confidentiality and availability are not directly affected by the flaw itself, though downstream SSRF filter bypass can enable further attacks.
Root Cause
The root cause is missing input-family validation before string comparison. The masked-string equality check assumed both operands had matching widths but never enforced that assumption. Bit strings such as 00001010 produced by a00::1 and 10.0.0.0/8 collide when compared as prefixes.
Attack Vector
An attacker supplies an address of one family to an application that expects the other family. If the application uses isInSubnet or isHostInSubnet to decide whether the address falls inside an internal or blocked range, the check can be tricked. In an SSRF filter, this allows an IPv6 address whose leading bits match an internal IPv4 range to pass the allowlist and reach protected internal services.
// Security patch in src/common.ts
// Source: https://github.com/beaugunderson/ip-address/commit/1343629d57fea413644a5c9d41ff1e59619f3f28
export function isHostInSubnet(this: Address4 | Address6, address: Address4 | Address6) {
// mask() is a bit string of the family's width, and the leading bits of a
// 32-bit string can coincide with those of a 128-bit one (a00::1 and
// 10.0.0.0/8 both mask to 00001010), so the widths must agree before the
// strings are compared.
if (this.binaryZeroPad().length !== address.binaryZeroPad().length) {
return false;
}
return this.mask(address.subnetMask) === address.mask();
}
Detection Methods for CVE-2026-101912
Indicators of Compromise
- Requests to internal services originating from application endpoints that accept user-supplied URLs or hostnames.
- Application log entries showing IPv6 addresses passing filters that were designed to block internal IPv4 ranges (or the inverse).
- Outbound connections from application servers to link-local, loopback, or private-range destinations that should have been denied.
Detection Strategies
- Perform a software composition analysis scan of package.json and package-lock.json files for ip-address versions below 10.7.1.
- Audit application code for calls to isInSubnet and isHostInSubnet where the input address family is not validated before the call.
- Add regression tests that pass cross-family address pairs (IPv4 host vs IPv6 subnet and vice versa) and assert the result is false.
Monitoring Recommendations
- Monitor egress traffic from application tiers for connections to RFC 1918, loopback, and IPv6 unique local address (ULA) destinations.
- Log and alert on SSRF filter decisions, including the source address, target address, and match verdict for later correlation.
- Track dependency updates in CI pipelines and flag builds that pin ip-address at a vulnerable version.
How to Mitigate CVE-2026-101912
Immediate Actions Required
- Upgrade ip-address to version 10.7.1 or later across all application dependencies and lockfiles.
- Rebuild and redeploy any container images, serverless bundles, or Node.js services that pin an earlier version.
- Review SSRF filters and network allowlists that depend on isInSubnet or isHostInSubnet for defense-in-depth gaps.
Patch Information
The fix is available in GitHub Release v10.7.1. The patch adds a width check using binaryZeroPad().length before the masked-string comparison and returns false when the two operands belong to different families. See the GitHub Security Advisory GHSA-j6r3-76f7-8jcv and the GitHub Commit Update for full details.
Workarounds
- Explicitly check the address family with instanceof Address4 or instanceof Address6 before calling the containment methods, and reject cross-family comparisons.
- Convert addresses to a common family before comparison using Address6.fromAddress4(), to4(), or toAddress4Nat64() as documented in the patch.
- Layer independent network-level controls, such as egress firewalls that block RFC 1918 and IPv6 ULA destinations, so a single filter miss does not enable SSRF.
# Configuration example: upgrade the vulnerable dependency
npm install ip-address@^10.7.1
npm audit --production
# Verify the installed version
npm ls ip-address
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

