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
Open
security(core): reject the RFC 8215 local-use NAT64 prefix in the SSRF filter (24.05)#7960ar2rsawseen wants to merge 1 commit into
ar2rsawseen wants to merge 1 commit into
Conversation
…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>
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.
Backport of #7959 to
release.24.05.isBlockedIPin the sharedapi/utils/ssrf-protection.jsadmits only ipaddr.jsunicastaddresses.ipaddr.js@1.9.1reports the well-known NAT64 prefix (64:ff9b::/96) asrfc6052(rejected) but the RFC 8215 local-use prefix (64:ff9b:1::/48) as genericunicast, so it was accepted. This adds an explicit check to reject64: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