Skip to content

fix(graphql): add SSRF protection to _test_endpoint [C6]#548

Merged
lakhansamani merged 1 commit intomainfrom
fix/c6-ssrf-test-endpoint
Apr 4, 2026
Merged

fix(graphql): add SSRF protection to _test_endpoint [C6]#548
lakhansamani merged 1 commit intomainfrom
fix/c6-ssrf-test-endpoint

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

  • C6 (Critical): _test_endpoint mutation could reach cloud metadata (169.254.169.254), internal services
  • Adds DNS resolution + private IP filtering before making HTTP requests
  • Blocks: private (10/172.16/192.168), loopback, link-local, CGN, multicast, reserved, IPv6 ULA/link-local

Test plan

  • Package compiles
  • Verify webhook testing still works with public endpoints
  • Verify 169.254.169.254, 10.x.x.x, 127.0.0.1 are rejected

The _test_endpoint mutation allowed server-side HTTP requests to
arbitrary URLs including private networks and cloud metadata endpoints
(169.254.169.254). Now validates endpoint URLs by:
- Requiring http/https scheme
- Resolving hostname to IPs
- Rejecting private, loopback, link-local, CGN, and reserved ranges
- Covering both IPv4 and IPv6

Fixes: C6 (Critical)
@lakhansamani lakhansamani merged commit a385996 into main Apr 4, 2026
@lakhansamani lakhansamani deleted the fix/c6-ssrf-test-endpoint branch April 4, 2026 05:42
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