The gate and its parser disagree on what an IPv4-mapped IPv6 looks like
CVE-2026-43929 lands on ssrfcheck 1.3.0 and earlier. ssrfcheck's parseURL opens with new URL(normalizeURLStr(input)). WHATWG URL is what Node implements behind the global URL, and the spec has one rule for IPv4-mapped IPv6: when the host is an IPv6 literal containing a dotted-IPv4 tail, the parser converts the tail to two hex hextets before returning the host. That conversion is the canonicalization step the regex is supposed to look at.
// src/parse-url.js
function parseURL(input, autoPrependProtocol) {
const RESULT_INVALID_URL = { validSchema: false };
try {
const url = new URL(normalizeURLStr(input));
const ipcheck = trimBrackets(url.hostname);
const ipVersion = isIP(ipcheck);
const hostIsIp = !!ipVersion;
// ...
return Object.assign(url, {
ip: hostIsIp ? ipcheck : null,
validSchema: true,
hasUnsafeChars,
ipVersion,
hostIsIp,
});
} catch {
// ...
}
}
For input http://[::ffff:127.0.0.1]/, the chain produces, verifiable in any Node REPL:
> new URL('http://[::ffff:127.0.0.1]/').hostname
'[::ffff:7f00:1]'
> new URL('http://[::ffff:169.254.169.254]/').hostname
'[::ffff:a9fe:a9fe]'
> new URL('http://[0:0:0:0:0:ffff:127.0.0.1]/').hostname
'[::ffff:7f00:1]'
The brackets come off in trimBrackets. isIP('::ffff:7f00:1') returns 6. The string ::ffff:7f00:1 is the only representation of that input the rest of the library will ever see.
Now look at the regex chain privIp6 ran against it for two years and four months.
// src/is-private-ip.js (pre-patch, 1.3.0)
function privIp6 (ip) {
return /^::$/.test(ip) ||
/^::1$/.test(ip) ||
/^::f{4}:([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(ip) ||
/^::f{4}:0.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(ip) ||
/^64:ff9b::([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(ip) ||
/^100::([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4}):?([0-9a-fA-F]{0,4})$/.test(ip) ||
/^2001::([0-9a-fA-F]{0,4}):?(...truncated for brevity...)*/.test(ip) ||
/^f[c-d]([0-9a-fA-F]{2,2}):/i.test(ip) ||
/^fe[8-9a-bA-B][0-9a-fA-F]:/i.test(ip) ||
/^ff([0-9a-fA-F]{2,2}):/i.test(ip)
}
Three of those regexes are reserved for IPv4-bearing IPv6 ranges: ::ffff: (IPv4-mapped, RFC 4291), ::ffff:0. (a typo with five capture groups for a thing that has four), and 64:ff9b:: (NAT64, RFC 6052). All three require literal dots inside the IPv6 host. All three test for a string the upstream new URL() will never have produced.
The rest of the regex chain (100::, 2001::, 2001:db8::, 2002::, fc/fd ULAs, fe80:: link-local, ff00:: multicast) is written in hex prefix form. Those regexes match the WHATWG canonical form and work correctly. The dot-form regexes match nothing the pipeline can feed them.
The control flow that ships the bypass
// src/index.js
const {
ip, hostIsIp, ipVersion, hostname,
/* ... */
} = parseURL(input, options.autoPrependProtocol);
// ...other validators omitted...
if (hostIsIp && (options.noIP || isLoopbackAddr(ip) || isPrivateIP(ip, ipVersion))) {
return false;
}
return true;
For http://[::ffff:127.0.0.1]/:
hostIsIp is true (the host parsed as a v6 literal).
isLoopbackAddr('::ffff:7f00:1') checks /^127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/ and /^::1$/. Neither matches.
isPrivateIP('::ffff:7f00:1', 6) calls privIp6. None of the regexes match. Returns false.
isSSRFSafeURL returns true. The application reads "safe" and dials the URL. Node's network stack resolves [::ffff:127.0.0.1] the way every operating system since RFC 4291 has resolved it: as IPv4 over the v6 syntax, connecting to 127.0.0.1.
Run the seven URLs the CVE-2026-43929 reporter filed against pre-patch ssrfcheck 1.3.0 in a Node REPL:
BYPASS -> http://[::ffff:127.0.0.1]/
BYPASS -> http://[::ffff:169.254.169.254]/
BYPASS -> http://[::ffff:192.168.1.1]/
BYPASS -> http://[::ffff:10.0.0.1]/
BYPASS -> http://[::ffff:172.16.0.1]/
BYPASS -> http://[::ffff:7f00:1]/
BYPASS -> http://[0:0:0:0:0:ffff:127.0.0.1]/
BLOCKED -> http://127.0.0.1/
BLOCKED -> http://[::1]/
The second row, 169.254.169.254, is the cloud-metadata address shared by AWS, GCP, and Azure. A backend running ssrfcheck against a user-supplied URL parameter, with no other defense in the chain, will return AWS IMDS credentials when asked. The library cleared the request as safe.
The diff describes a regex that was never going to work
The 1.4.0 fix replaces the entire privIp6 regex chain with a BlockList check. The relevant lines:
// src/is-private-ip.js (post-patch, 1.4.0)
const IPV4_BEARING_IPV6_BLOCKLIST = new BlockList();
IPV4_BEARING_IPV6_BLOCKLIST.addSubnet('::ffff:0:0', 96, 'ipv6');
IPV4_BEARING_IPV6_BLOCKLIST.addSubnet('::ffff:0:0:0', 96, 'ipv6');
IPV4_BEARING_IPV6_BLOCKLIST.addSubnet('64:ff9b::', 96, 'ipv6');
IPV4_BEARING_IPV6_BLOCKLIST.addSubnet('64:ff9b:1::', 48, 'ipv6');
IPV4_BEARING_IPV6_BLOCKLIST.addSubnet('::', 96, 'ipv6');
function privIp6 (ip) {
const normalized = normalizeIPv6ForBlockList(ip);
if (isIP(normalized) !== 6) return false;
const embeddedIPv4 = ipv4FromIPv4BearingIPv6(normalized);
return Boolean(
(embeddedIPv4 && privIp4(embeddedIPv4)) ||
DIRECT_PRIVATE_IPV6_BLOCKLIST.check(normalized, 'ipv6')
);
}
BlockList is the right primitive. It operates on the binary form of the address, the same regardless of textual representation. A /96 mask over ::ffff:0:0 catches every IPv4-mapped IPv6 host the parser will produce, in hex or in any dotted-form survivor, because BlockList does not read the string. The check now runs at the representational level the parser actually emits.
What the diff does not say out loud: the dot-form regexes the patch deletes had a runtime hit count of zero. The library shipped them, the test runner never exercised them through the public API, and no input the library could give them in production would have matched them. Removing them changed the runtime behavior by zero. The patch is not, in any input that reaches it, replacing a broken check with a working one. It is replacing an absent check with a present one.
Look at the interim fix, commit 59e1475, the first attempt on the same day the reporter filed:
+function ipv4FromMappedIPv6(ip) {
+ const normalized = ip.toLowerCase();
+ const match = normalized.match(/^::f{4}:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);
+ if (!match) return null;
+ /* unpack high/low hextets back to dotted IPv4 */
+}
+
function privIp6 (ip) {
+ const mappedIPv4 = ipv4FromMappedIPv6(ip);
+ if (mappedIPv4) return privIp4(mappedIPv4);
+
return /^::$/.test(ip) ||
/^::1$/.test(ip) ||
/^::f{4}:([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(ip) ||
/^::f{4}:0.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(ip) ||
// ...all the other dead regexes kept in place...
The author wrote a new branch in hex form, placed it ahead of the regex chain, and left every dot-form regex below it. The dot-form regexes survived first contact with the fix. They survived because the author was patching the symptom, not the file. Three more commits later, on the way to 1.4.0, the entire chain was replaced. The dead regexes never matched a string on the way out the door.
The dot-form branch was, in the operational sense, a comment that compiles.
Pattern: Gate Before Canonicalize, mirrored
ssrfcheck is the eleventh exhibit on Gate Before Canonicalize. The pattern in this catalog covers a security predicate that inspects the wrapped form of an input while the action below it consumes the unwrapped form. Most of the prior exhibits run the predicate before the canonicalization step. Gotenberg's regex case-sensitively matches ^https?:// and net/url.Parse lowercases the scheme after. Alfresco's path blacklist matches .. and Tomcat resolves ..; to the same parent reference. Gotenberg again, where [::ffff:127.0.0.1] evades the deny-list regex and net/netip.ParseAddr unmaps it to the IPv4 the regex was supposed to block.
ssrfcheck runs the canonicalization step first. new URL() rewrites the input into the WHATWG canonical form, then the predicate sees the canonical form, then privIp6 tests it with a regex written for what the user typed at the keyboard. Same disease, mirrored ordering. Where Gotenberg's structural fix would be to canonicalize before the regex runs, ssrfcheck's structural fix is to rewrite the predicate against the form the parser already produced. The 1.4.0 diff does that rewrite by switching the predicate from textual pattern match to binary BlockList.
The fact that this is the third exhibit this catalog has filed against a private-IP gate in a Node.js or Go HTTP client should be read in order. EspoCRM's host check had no IPv4 parser and libcurl did: the strict PHP parser rejected 0177.0.0.1; libcurl's inet_aton accepted it and dialed 127.0.0.1. Open-WebSearch wrote the IPv6 deny list and isIP('[::1]') made the dispatcher exit before reading it: the brackets stayed on, the dispatcher's first call returned 0, the v6 enforcement path was unreachable. ssrfcheck wrote the IPv6 deny list and the regex was for a form the parser strips: brackets came off, isIP returned 6, the dispatcher entered privIp6, and the regex did not match because the parser had already canonicalized away the substring the regex matched.
Three different libraries, authored independently in two different languages, by three different maintainers, in two different release months. The pattern lives at the layer where developers think about IPv4-mapped IPv6 as a textual form (::ffff:127.0.0.1) and operating systems route it as a binary one (the loopback IPv4 underneath). Any gate that reads the address as a string and inspects it for human-typed substrings is going to lose to any parser that canonicalizes before the gate runs.
The quiet part
The library is named for the check. The check, for the most common SSRF bypass primitive in 2026, did not exist. Three regex lines in src/is-private-ip.js were written for a string format that the library's own URL parser, on the way in, rewrites away. Every test that exercised the function through isSSRFSafeURL reached the function with the post-canonical hex form. None of those tests reached the dot-form branch. The dot-form branch shipped from initial commit on December 18, 2023, and was deleted on April 26, 2026, without ever having matched a string the library could give it.
The reporter, @hits313, filed the CVE-2026-43929 advisory in late April 2026. The first commit responding to the report was authored the same day. The dead code shipped for two years and four months between when the regex was first committed and when somebody asked what input it was supposed to receive.
A library called ssrfcheck running a regex that matched no string the library could feed it is the kind of finding the genre records dryly. The patch is the admission. The 1.4.0 diff replaces a regex chain whose IPv4-bearing branches had a runtime hit count of zero with a BlockList chain that has a non-zero hit count. The runtime behavior of the new code is the runtime behavior the README always promised. The runtime behavior of the old code was advertising.
PoC: advisories/GHSA-j4rj-2jr5-m439
The library named for the check shipped without making it.