Skip to content

security(core): reject the RFC 8215 local-use NAT64 prefix in the SSRF filter (24.05) - #7960

Open
ar2rsawseen wants to merge 1 commit into
release.24.05from
backport/ssrf-nat64-local-use-2405
Open

security(core): reject the RFC 8215 local-use NAT64 prefix in the SSRF filter (24.05)#7960
ar2rsawseen wants to merge 1 commit into
release.24.05from
backport/ssrf-nat64-local-use-2405

Conversation

@ar2rsawseen

Copy link
Copy Markdown
Member

Backport of #7959 to release.24.05.

isBlockedIP in the shared api/utils/ssrf-protection.js admits only ipaddr.js unicast addresses. ipaddr.js@1.9.1 reports the well-known NAT64 prefix (64:ff9b::/96) as rfc6052 (rejected) but the RFC 8215 local-use prefix (64:ff9b:1::/48) as generic unicast, so it was accepted. This adds an explicit check to reject 64:ff9b:1::/48, matching the existing NAT64 handling. Network-specific NAT64 prefixes from an operator's own unicast space cannot be distinguished by prefix and remain out of scope.

Identical to #7959. Two unit tests added; full SSRF suite and eslint green.

🤖 Generated with Claude Code

…F filter

Backport of #7959 to release.24.05.

isBlockedIP admits only ipaddr.js 'unicast' addresses. ipaddr.js@1.9.1 reports the
well-known NAT64 prefix (64:ff9b::/96) as 'rfc6052' but the RFC 8215 local-use
prefix (64:ff9b:1::/48) as generic unicast, so add an explicit check to reject that
prefix, matching the existing NAT64 handling. Network-specific NAT64 prefixes from
an operator's own unicast space cannot be distinguished by prefix and remain out of
scope.

Adds unit tests for 64:ff9b:1::7f00:1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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