Repository navigation
fix: block CGNAT addresses used to reach cloud metadata - #189
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
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>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This branch has not been deployed
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.
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 to100.100.100.200reaches 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.isPrivateIPv4now rejects100.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_addressesremains the override.The Node.js
process.getBuiltinModulelink indocs/SECURITY.mdpointed at an unversioned URL that 404s; it now points at the v22.12.0 docs page.Validation:
bun run lintandbun run test(unit, integration, and browser).