Pulse/pkg/securityutil
Richard Courtman d4ce19219c Block IPv6 transition addresses in SSRF guards (GHSA-8f8r-p75h-jwq5)
The net.IP predicates every SSRF guard is built from read only the literal
address bytes, so an IPv6 transition address smuggles an internal IPv4
destination past all of them. 64:ff9b::a9fe:a9fe reaches 169.254.169.254
while IsLoopback, IsPrivate, IsLinkLocalUnicast and To4 all report an
ordinary public address, defeating both the webhook URL validator and the
restricted outbound transport with the same input.

Add securityutil.EmbeddedIPv4Candidates, which unwraps NAT64 (RFC 6052
well-known and RFC 8215 local-use prefixes), 6to4, Teredo, ISATAP,
IPv4-compatible and IPv4-translated encodings, and run every candidate
through the caller's own policy in both layers. The embedded destination
inherits the outer policy rather than a stricter one, so a NAT64 address
wrapping a permitted public target stays permitted and AllowPrivateIPs /
AllowLoopback relax the embedded check the same way they relax the outer.

Reported by tonghuaroot.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 17:57:26 +01:00
..
embedded_ipv4.go Block IPv6 transition addresses in SSRF guards (GHSA-8f8r-p75h-jwq5) 2026-07-31 17:57:26 +01:00
embedded_ipv4_test.go Block IPv6 transition addresses in SSRF guards (GHSA-8f8r-p75h-jwq5) 2026-07-31 17:57:26 +01:00
httpurl.go Add an explicit operator override for plaintext HTTP to non-local Pulse hosts 2026-07-14 16:42:02 +01:00
httpurl_branchcov0724pm_test.go Cover the missing arms of the SSRF, clone and classifier guards 2026-07-25 00:39:15 +01:00
httpurl_test.go Add an explicit operator override for plaintext HTTP to non-local Pulse hosts 2026-07-14 16:42:02 +01:00
outbound_branchcov0724pm_test.go Cover the missing arms of the SSRF, clone and classifier guards 2026-07-25 00:39:15 +01:00
outbound_http.go Block IPv6 transition addresses in SSRF guards (GHSA-8f8r-p75h-jwq5) 2026-07-31 17:57:26 +01:00
outbound_http_branchcov0718_test.go Add Go branch-coverage tests for twelve pure backend helpers 2026-07-19 15:10:09 +01:00
outbound_http_test.go fix(securityutil): dial every permitted resolved IP instead of pinning the first 2026-07-17 23:35:45 +01:00
pkg_securityutil_httpurl_branchcov0716_test.go Add Go branch-coverage tests for pure config and helper packages 2026-07-16 10:19:51 +01:00
securityutil_websocket_origin_branchcov0716_test.go Add Go branch-coverage tests for models config securityutil and aicontracts helpers 2026-07-16 14:20:13 +01:00
websocket_origin.go Allow insecure dev HTTP agent runtime URLs 2026-04-23 13:48:54 +01:00