Skip to content

net: expand BlockList.PRIVATE_RANGES (unspecified, CGNAT, benchmarking) - #65204

Open
SashaMIT wants to merge 2 commits into
nodejs:mainfrom
SashaMIT:fix/blocklist-private-ranges-unspecified
Open

net: expand BlockList.PRIVATE_RANGES (unspecified, CGNAT, benchmarking)#65204
SashaMIT wants to merge 2 commits into
nodejs:mainfrom
SashaMIT:fix/blocklist-private-ranges-unspecified

Conversation

@SashaMIT

Copy link
Copy Markdown

Summary

BlockList.PRIVATE_RANGES is documented as a convenience list of private, loopback, and link-local ranges for blocking non-routable addresses. It already includes 127.0.0.0/8 and ::1/128, but omitted:

  • 0.0.0.0/8 (IPv4 "this" network / unspecified; common alternate localhost spelling)
  • ::/128 (IPv6 unspecified)

Callers who populate a blocklist from PRIVATE_RANGES alone would still treat 0.0.0.0 and :: as allowed.

Test plan

  • Extended test/parallel/test-blocklist.js PRIVATE_RANGES coverage for 0.0.0.0, 0.0.0.1, and ::
  • Docs list updated in doc/api/net.md

This API is unreleased (added: REPLACEME), so this is a constants/docs completion rather than a HackerOne report.

Made with Cursor

PRIVATE_RANGES is documented as covering private, loopback, and link-local
ranges used to block non-routable addresses. It already includes 127.0.0.0/8
and ::1/128 but omitted the IPv4 "this" network (0.0.0.0/8) and the IPv6
unspecified address (::/128), which are common alternate localhost spellings.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Aug 11, 2026
Include RFC 6598 (100.64.0.0/10) and RFC 2544 (198.18.0.0/15) so the
helper matches common non-global IPv4 space used by carrier NAT and
benchmarking labs.
@SashaMIT

Copy link
Copy Markdown
Author

Follow-up commit on this branch: also include RFC 6598 CGNAT (100.64.0.0/10) and RFC 2544 benchmarking (198.18.0.0/15) in BlockList.PRIVATE_RANGES, with tests for 100.64.0.1 / 198.18.0.1.

Same unreleased-API helper surface as the 0.0.0.0/8 + ::/128 additions already in this PR.

@SashaMIT SashaMIT changed the title net: include 0.0.0.0/8 and ::/128 in BlockList.PRIVATE_RANGES net: expand BlockList.PRIVATE_RANGES (unspecified, CGNAT, benchmarking) Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants