Skip to content

fix: block CGNAT addresses used to reach cloud metadata - #189

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
fix/ssrf-cgnat-metadata
Draft

cursor[bot] wants to merge 1 commit into
masterfrom
fix/ssrf-cgnat-metadata

Conversation

@cursor

@cursor cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Shared address space 100.64.0.0/10 (RFC 6598) was treated as a public destination. On an Alibaba Cloud ECS instance, a WebFinger lookup or redirect to 100.100.100.200 reaches the instance metadata service (Alibaba documents this address as an SSRF target). The same range is used by CGNAT and Tailscale, so a redirect can also fetch an internal WebFinger record and return it.

isPrivateIPv4 now rejects 100.64.0.0/10. IPv4-mapped and IPv4-compatible forms are covered because they already delegate to that check. Addresses just outside the range (100.63.255.255, 100.128.0.1) still proceed. allow_private_addresses remains the override.

The Node.js process.getBuiltinModule link in docs/SECURITY.md pointed at an unversioned URL that 404s; it now points at the v22.12.0 docs page.

Validation: bun run lint and bun run test (unit, integration, and browser).

Open in Web View Automation 

100.64.0.0/10 was classified as a public destination, so a lookup or
redirect could connect to Alibaba Cloud metadata at 100.100.100.200
and to other shared-address targets. Treat that range as private,
including IPv4-mapped forms.

Also retarget the Node.js process.getBuiltinModule docs link at the
v22.12.0 page. The unversioned URL returns 404.

Co-authored-by: Nick Jennings <silverbucket@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ffa9c0e-41e2-4a3c-896b-2e0a6b6f2373

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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