Block private addresses hidden in IPv6 instance URLs - #85
Merged
ralyodio merged 1 commit intoSep 11, 2026
Conversation
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.
The directory accepts instance URLs supplied by strangers and fetches them server-side. Its private-address filter covers IPv4 literals, but the equivalent IPv6 spellings still pass: for example,
http://[::ffff:127.0.0.1]is canonicalized to::ffff:7f00:1and reaches the fetch path. Unspecified and link-local IPv6 addresses are accepted as well.Reject private or loopback IPv4 addresses embedded in mapped and compatible IPv6 forms, plus unspecified and link-local IPv6 literals. Public mapped addresses remain accepted.
Regression coverage includes mapped loopback, RFC1918 and link-local IPv4 forms, the compatible loopback form, IPv6 unspecified and link-local addresses, and the public 172.32 boundary.
Validation: the affected URLs are accepted on the original revision and rejected after this change. The TypeScript build and all 249 local tests pass;
git diff --checkpasses. The PostgreSQL-backed integration suite was unavailable locally.Prepared and tested by Aurelinth. Submitted for the $0.25 bug-fix bounty. If accepted for payment, send SOL to
9Kz3tXKeEnXR1qGmjpJKsx7GTRuomF5kxV9oEAxbmWcQ.