LTS-4657: override ip-address to ^10.4.0 — fixes GHSA-mwp4-54f8-5fhr (leading-zero octet SSRF) - #20
Merged
Merged
Conversation
…(leading-zero octet SSRF) ip-address 10.2.0 arrives transitively via socks (^10.1.1) under browserstack-node-sdk -> @kubernetes/client-node -> socks-proxy-agent, and via proxy-agent/pac-proxy-agent under @wdio/utils. Address4 decoded a leading-zero octet as decimal while resolvers decode it as octal, so isPrivate()/isInSubnet() could misclassify an internal target as public. 10.4.0 clears all three open advisories on the installed 10.2.0: GHSA-mwp4-54f8-5fhr (high, <= 10.3.0) patched 10.3.1 GHSA-4xrf-jv44-h6hh (medium, 10.1.1 - 10.2.1) patched 10.2.2 GHSA-22jq-vg5j-6vgg (medium, 10.1.1 - 10.2.0) patched 10.2.1 Verified: npm ci from this lock installs ip-address@10.4.0 (overridden), npm audit no longer reports ip-address, and the advisory PoC now behaves as patched — Address4.isValid('012.0.0.1') === false and the constructor throws AddressError, while '10.0.0.1' still parses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MohitSinghBS
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes LTS-4657 — GHSA-mwp4-54f8-5fhr (High).
What changed
One line in
overrides+ the matching lock entry.ip-address10.2.0 → 10.4.0."serialize-javascript": "^7.0.3", + "ip-address": "^10.4.0",Why
Address4accepted an octet with a leading zero and decoded it as decimal, while the WHATWG URL parser,inet_atonandgetaddrinfodecode it as octal. Sonew Address4('012.0.0.1').isPrivate()returnedfalsewhilefetch('http://012.0.0.1/')connects to10.0.0.1. Every classifier built onparseinherits it —isPrivate(),isLoopback(),isLinkLocal(),isCGNAT(),isInSubnet(),isHostInSubnet(),correctForm().Where it comes from
ip-addressis not a direct dependency. Single copy in the tree,dev: true, pulled bysocks(^10.1.1):Blast radius
devDependenciesonly — this repo declares no runtimedependenciessocksusesip-addressto parse SOCKS proxy target addresses. Nothing in this sample makes a trust-boundary decision fromAddress4, and no SSRF filter is built on it.isPrivate()/isInSubnet(). Not a shape this repo has.10.4.0has no dependencies and the sameengines(node >= 12) as 10.2.0.socksasks for^10.1.1, which10.4.0satisfies — no resolution changes anywhere else in the tree.Bumped anyway because this is a public, customer-facing sample: customers clone it and run
npm install, so a High advisory sitting in the lock is a bad look regardless of local reachability — and it is a 4-line diff.Coverage
10.4.0clears all three openip-addressadvisories against the installed 10.2.0, not just the one on the ticket:<= 10.3.010.1.1 – 10.2.110.1.1 – 10.2.0Corresponding Dependabot alerts: #132, #126, #125.
^10.4.0rather than the 10.3.1 floor — 10.4.0 islatest, published 2026-07-31, so it clears the repo's.npmrcmin-release-age=7guard, and it matches the^10.4.0pin already chosen forload-testing-backend.Verification
Advisory PoC against the installed tree — now behaves as the patched release documents:
Note on the lockfile diff
The lock hunk is hand-scoped to the three
ip-addressfields (version/resolved/integrity). A fullnpm install --package-lock-onlyon npm 10.9.2 additionally strips 11 unrelated"peer": truemarkers; that churn is inert but noise in a security PR, so it was reverted.integritywas verified againstnpm view ip-address@10.4.0 dist.integrity, andnpm ciwas run from the resulting lock.Not fixed here
npm auditstill reports 11 findings (5 high / 6 moderate) on this branch —brace-expansion,fast-uri,fast-xml-parser,js-yaml,undici,qs,uuid,gaxios,googleapis*. The first three are already covered by open PR #19 (LTS-4523). The rest are out of scope for this ticket.🤖 Generated with Claude Code