Skip to content

[Security] DNS rebinding protection only checks IPv4 — IPv6 AAAA records bypass #668

Closed

Description

@wernerkasselman-au

Summary

resolvesToBlockedIp() in browse/src/url-validation.ts:51 only calls dns.resolve4() (A records). It never checks dns.resolve6() (AAAA records). The BLOCKED_METADATA_HOSTS set includes fd00:: but that is only matched against the raw hostname string, not resolved IPv6 addresses. A DNS rebinding attack via an AAAA record pointing to a blocked IPv6 metadata address bypasses protection.

Reproduction

# Attacker sets up DNS:
# evil.com  AAAA  fd00::
$B goto http://evil.com   # passes validation, reaches metadata endpoint

Fix

PR #664 adds resolve6 check in parallel with resolve4, using Promise.all with individual .catch(() => []) for resilience.

Found via sqry AST-based semantic code graph analysis.

Activity

  1. added a commit that references this issue on Apr 1, 2026
    7959212
  2. garrytan commented on Apr 13, 2026

    @garrytan
    Owner

    Fixed in commit c151fabf (PR #664, v0.15.13.0). resolvesToBlockedIp now checks both IPv4 A records and IPv6 AAAA records in parallel. ULA range (fc00::/7) also blocked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions