Skip to content

Security: refuse loopback aliases and more IPv6 ranges in the SSRF guard - #486

Merged
SandObserver merged 1 commit into
mainfrom
security/ssrf-aliases-and-ipv6-ranges
Oct 18, 2026
Merged

SandObserver merged 1 commit into
mainfrom
security/ssrf-aliases-and-ipv6-ranges

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Resolve dotless service names in guardSsrf instead of passing them unchecked, and pin the resolved address.
  • Refuse a dotless name that resolves to loopback, unspecified or link-local (isSelfAddress). Private addresses stay allowed for Docker service names.
  • Add 6to4 (2002::/16), local-use NAT64 (64:ff9b:1::/48) and site-local (fec0::/10) to BLOCKED_IPV6_RE.
  • Share the IPv4 range and IPv4-in-IPv6 handling between the private and self address checks.

Testing
All green, including e2e. Added tests for loopback aliases, unresolved service names, pinned service names and the three IPv6 ranges.

Changelog

Security

  • Refuse service names that resolve to loopback or link-local addresses, such as ip6-localhost, in admin URL tests.
  • Block 6to4, local-use NAT64 and site-local IPv6 addresses in admin URL tests.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

@SandObserver SandObserver added the security Security fix label Oct 18, 2026
Resolve dotless service names in guardSsrf and pin the result. Refuse a
name that resolves to loopback, unspecified or link-local, which covers
ip6-localhost, ip6-loopback and a host name mapped to 127.0.1.1. Private
addresses stay allowed for Docker service names.

Block 6to4 (2002::/16), local-use NAT64 (64:ff9b:1::/48) and site-local
(fec0::/10) IPv6 literals and resolved addresses.
@SandObserver
SandObserver force-pushed the security/ssrf-aliases-and-ipv6-ranges branch from d29d04f to 4707126 Compare October 18, 2026 04:35
@SandObserver
SandObserver merged commit 725bbf2 into main Oct 18, 2026
6 checks passed
@SandObserver
SandObserver deleted the security/ssrf-aliases-and-ipv6-ranges branch October 18, 2026 04:41
stackyard-release Bot pushed a commit that referenced this pull request Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant