fix(ssrf-gate): flag RFC 6598 shared address space (100.64.0.0/10) - #18
Open
Mr-Neutr0n wants to merge 1 commit into
Open
fix(ssrf-gate): flag RFC 6598 shared address space (100.64.0.0/10)#18Mr-Neutr0n wants to merge 1 commit into
Mr-Neutr0n wants to merge 1 commit into
Conversation
privateIPv4Reason had no case for 100.64.0.0/10, so a web_fetch or http request to a tailnet host, a CGNAT address, or a cloud provider's internal endpoint in that range passed the gate with no prompt. Adds the range and the module's first test file.
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.
privateIPv4Reasoninsrc/tools/privateHost.tscovers loopback, RFC1918, link-local/metadata and this-network, but has no case for RFC 6598 shared address space,100.64.0.0/10. So the gate returns''andweb_fetch/httpreach anything in that range with no prompt at all.That range is not theoretical infrastructure. In practice it holds:
100.64.0.0/10address, and100.100.100.100is the MagicDNS resolverSo on any machine joined to a tailnet — pretty common on a testing box — the agent can reach internal hosts silently. That is the exact outcome the module header says it exists to prevent ("so the agent can't silently reach internal services").
Verified against
main:Scope
One range, one line. I deliberately did not add 198.18.0.0/15, 192.0.0.0/24, multicast or 240/4 — they are reserved but nobody runs internal HTTP services on them, and padding the gate with ranges that never fire only trains people to ignore it. 100.64/10 earns its place because real infrastructure lives there.
This also does not change the permissive posture. It adds a prompt, not a block — same as every other range here, and consistent with the H2 decision in AUDIT.md that reaching internal addresses is often the goal. Under YOLO it is auto-approved as before.
Tests
src/tools/privateHost.tshad no test file, so this adds one — 24 cases covering the existing ranges as well as the new one, including the boundaries that matter:100.63.255.255and100.128.0.1must stay unflagged (just outside the /10)172.15.0.1/172.32.0.1must stay unflagged (existing 172.16/12 boundary, previously untested)parseHTTPURLscheme rejectionThe three
100.64/10cases fail onmainand pass with the change; the other 21 pass both ways, so they document existing behaviour rather than assert the fix.Full suite: 63 files, 681 tests, all passing.
I use AI assistance in my workflow; the behaviour above is from runs against
mainat117c95c.