Skip to content

fix(security): SSRF guard checks resolved addresses, pins connection (v0.12.194) - #46

Merged
VickyXAI merged 2 commits into
mainfrom
fix/ssrf-dns-resolve
Oct 22, 2026
Merged

VickyXAI merged 2 commits into
mainfrom
fix/ssrf-dns-resolve

Conversation

@VickyXAI

Copy link
Copy Markdown
Contributor

Port of BlockRunAI/ClawRouter#506 — src/local-guard.ts was byte-identical, so the patched file is copied as-is; proxy.ts passes viaUpstreamProxy; tests ported.

img2img image/mask URL downloads: the SSRF guard checked only the literal hostname, so public names resolving to private addresses passed, and fetch() re-resolved to connect (DNS-rebinding window). Each hop now resolves, refuses if any address is blocked, and pins the connection to the vetted addresses (node:http(s) lookup override, no undici). Behind an upstream proxy the request still goes through it.

Release bump to 0.12.194, which also ships the catalog changes merged since 0.12.193. No publish workflow in this repo — npm publish is manual after merge.

1bcMax added 2 commits October 22, 2026 14:20
…he connection

Port of ClawRouter#506. isBlockedSsrfHost() checked the hostname as written,
so public names resolving to private addresses (localtest.me,
127.0.0.1.nip.io, 169.254.169.254.nip.io) passed, and fetch() re-resolved the
name to connect, leaving a DNS-rebinding window. Each hop now resolves the
host, refuses if any address is blocked, and connects only to the vetted
addresses. Behind an upstream proxy the request still goes through it.
@VickyXAI
VickyXAI merged commit b1e9e90 into main Oct 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant