API SSRF Hardening

•
13
•

Hardens REST and GraphQL APIs against Server-Side Request Forgery (SSRF) vulnerabilities using defense-in-depth URL resolution and egress controls.

API SSRF Hardening provides actionable blue-team defensive guidance to protect application endpoints that fetch client-supplied URLs from Server-Side Request Forgery (OWASP API7:2023, CWE-918). It enforces a robust defense-in-depth strategy including DNS resolve-then-pin architectures, post-resolution IP filtering for private and link-local ranges, strict destination allowlists, redirect controls, IMDSv2 enforcement, and high-fidelity egress alerting on attempted internal metadata access.

Key Features

0113 GitHub stars
02Strict scheme, port, and domain allowlisting with non-HTTP protocol disabling
03Platform-level IMDSv2 enforcement and egress firewalling configuration
04Detection telemetry and alerting rules for internal subnet and metadata access attempts
05Resolve-then-pin socket connection strategy to prevent DNS rebinding attacks
06Post-resolution blocking of loopback, RFC1918, link-local, and cloud metadata IP ranges

Use Cases

01Securing webhook, URL preview, file importer, and image fetching features in web APIs
02Setting up egress network monitoring and detection rules for SSRF exploit attempts
03Preventing cloud metadata credential theft on AWS, GCP, and Azure workloads