Loading...
Loading...
Weekly AI insights —
Real strategies, no fluff. Unsubscribe anytime.
Written by Gareth Simono, Founder and CEO of Agentik {OS}. Full-stack developer and AI architect with years of experience shipping production applications across SaaS, mobile, and enterprise platforms. Gareth orchestrates 228 specialized AI agents to deliver production software 10x faster than traditional development teams.
Founder & CEO, Agentik {OS}
SSRF lets attackers hit your cloud metadata endpoints through your own server. Here's how to find, exploit, and fix it.

TL;DR: Server-Side Request Forgery (SSRF) lets attackers reach AWS and GCP metadata endpoints through your own application server, bypassing firewalls entirely. The Capital One breach exposed 100M+ records through exactly this vector. If your app fetches URLs from user input without allowlist validation, you are almost certainly vulnerable.
Server-Side Request Forgery (SSRF) is a vulnerability where an attacker tricks the server into making HTTP requests to unintended destinations. OWASP elevated SSRF to its own dedicated category in the Top 10 (A10:2021), recognizing it as a distinct and growing threat class separate from traditional injection. In cloud environments, a single SSRF bug can expose AWS IAM credentials, internal microservices, and database connection strings within seconds.
The reason SSRF is especially lethal in cloud infrastructure is the metadata service. AWS, GCP, and Azure all run a local HTTP endpoint (typically at 169.254.169.254) that returns IAM credentials, environment variables, and instance configuration. A server making a request to that address will get back privileged data. No authentication required.
We have seen this pattern repeatedly in our scans. A web app accepts a URL for image fetching, webhook delivery, or PDF generation. The developer validates the domain against a blocklist. The attacker bypasses the blocklist using redirects, DNS rebinding, or alternate IP representations like hex encoding. The server fetches the metadata endpoint. Credentials leak.
In 2024, 75% of organizations reported experiencing a cloud-related security incident, and misconfigured metadata access was a contributing factor in a substantial portion of those cases (CrowdStrike Global Threat Report, 2024).
The exploitation path in AWS follows a reliable chain. The attacker sends a crafted URL to a vulnerable endpoint. The server follows the URL and hits http://169.254.169.254/latest/meta-data/iam/security-credentials/. The response returns the IAM role name. A second request to the credentials endpoint returns temporary AWS access keys. The attacker now has cloud access.
AWS introduced IMDSv2 in 2019 specifically to address this. IMDSv2 requires a PUT request with a session token before any GET requests return data, breaking the simple one-step exploit. However, over 40% of AWS EC2 instances still ran IMDSv1 as of late 2023, leaving them fully exposed to classic SSRF metadata attacks (Wiz Research, 2023).
GCP's metadata endpoint at http://metadata.google.internal/computeMetadata/v1/ requires a Metadata-Flavor: Google header, which provides weak protection. An SSRF vulnerability combined with a header injection flaw removes even that barrier. Azure's Instance Metadata Service at http://169.254.169.254/metadata/instance requires an Metadata: true header with the same weakness.
Internal service enumeration is the other major attack vector. Once an attacker confirms SSRF works, they scan internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) for open services. Kubernetes API servers, Redis instances, Elasticsearch clusters, and internal admin dashboards are all reachable this way. The Capital One breach in 2019 exposed over 100 million customer records through exactly this chain: SSRF against an EC2 metadata endpoint, costing the company an $80 million penalty (FTC Settlement, 2021).
SSRF is hard to catch because it looks like legitimate application behavior. The server is making HTTP requests, which is normal. The request originates from the server's IP, not the attacker's. Standard WAF rules that block external attack traffic do not inspect internal-to-internal requests.
Static analysis tools miss most SSRF because the vulnerable code path often involves multiple hops: user input flows through sanitization, then gets passed to an HTTP client in a separate module. Taint tracking across module boundaries is an unsolved problem for most SAST tools. In our testing across real-world Node.js and Python codebases, popular SAST scanners caught fewer than 30% of SSRF patterns.
Dynamic scanners do better. Tools like Burp Suite Pro with SSRF-specific checks, or our AI-powered security audit, actively probe URL parameters with out-of-band detection using callback servers. The attacker supplies a URL pointing to a logging server. If the target server fetches it, SSRF is confirmed. This approach catches blind SSRF where responses are not returned to the attacker but the server-side request still fires.
Defenders often implement simple blocklists. Attackers have catalogued dozens of bypass techniques that circumvent them. Understanding these is essential for building effective defenses.
IP obfuscation: The address 169.254.169.254 can be represented as 0xa9fea9fe (hex), 2852039166 (decimal), 0251.0376.0251.0376 (octal), or via URL encoding variations. Simple string-matching blocklists fail against all of these. SSRF protection libraries must normalize IP addresses before comparison.
DNS rebinding: The attacker registers a domain that initially resolves to a permitted external IP. The application validates the domain, gets an external IP, and approves the request. Before the request executes, DNS TTL expires and the domain resolves to 169.254.169.254. This is a TOCTOU (time-of-check time-of-use) race condition in the validation logic. Standard allowlist validation does not protect against it.
Open redirect chaining: If any trusted domain hosts an open redirect endpoint, an attacker can chain it with SSRF. A URL like https://trusted-partner.com/redirect?url=http://169.254.169.254/ passes domain validation but redirects to the dangerous endpoint. HackerOne's 2023 Hacker-Powered Security Report noted that chained vulnerabilities involving SSRF and open redirects represented a growing share of critical-severity bug bounty submissions (HackerOne, 2023).
Alternative URI schemes: Some applications block http:// but forget file://, gopher://, dict://, or ftp://. The gopher:// protocol is particularly dangerous because it lets attackers craft arbitrary TCP payloads, turning SSRF into a direct attack vector for Redis, Memcached, and SMTP services running internally.
IPv6 and localhost variations: http://[::1]/ and http://[::] are IPv6 representations of localhost that many blocklists miss. http://0.0.0.0/ also resolves to localhost on many systems. Testing SSRF defenses requires probing all of these variants.
Testing for SSRF requires identifying every location where the application fetches a remote resource based on user-controlled input. This is broader than most developers expect.
Start with a mapping exercise. Every API endpoint, form field, and configuration option that accepts a URL or hostname is a candidate. Common locations include: webhook URLs, image and file import features, PDF generation endpoints that render external stylesheets or images, OAuth callback URLs, and any preview URL functionality. In a typical SaaS application, we find 8 to 15 SSRF candidate entry points during a thorough audit.
For each candidate, attempt structured probes in this order:
http://127.0.0.1/adminhttp://169.254.169.254/latest/meta-data/http://kubernetes.default.svc.cluster.local/http://your-collaborator-server.com/ssrf-testIf the application returns content from the internal URL, you have confirmed SSRF. If responses are blocked but you receive a callback on your logging server, you have blind SSRF. Blind SSRF is still exploitable for port scanning, internal service discovery, and in some cases data exfiltration through timing side-channels or DNS lookups.
Our cybersecurity scanning service automates this entire process. We run passive recon combined with targeted SSRF probes, covering all common URL entry points and testing bypass techniques systematically. Manual testing catches obvious cases; automated scanning catches the subtle ones at scale across your full application surface.
The IBM Cost of a Data Breach Report 2024 found that organizations with fully deployed security automation reduced breach costs by an average of $2.22 million compared to those without (IBM, 2024). Prevention here is substantially cheaper than incident response.
Allowlist over blocklist: Never validate URLs against a list of forbidden destinations. Allowlist the specific external domains your application must contact. If the app fetches images from user uploads, enforce that all fetched URLs resolve to public IP addresses outside reserved ranges and match an expected content type. Reject everything else by default.
Disable follow-redirects by default: Most HTTP client libraries follow redirects automatically. Configure your client to not follow redirects, or validate the final resolved destination after all redirects before executing. This eliminates the open-redirect chaining attack entirely.
Enable IMDSv2 on all EC2 instances: This is the single highest-impact remediation for AWS environments. IMDSv2 requires a session-oriented PUT that a simple SSRF cannot replicate. Enable it via instance metadata options in AWS console, or enforce it organization-wide through AWS Service Control Policies.
Network-level controls: Deploy an egress firewall preventing application servers from reaching 169.254.169.254, 169.254.170.2, and private RFC 1918 ranges that host management interfaces. Kubernetes NetworkPolicies can enforce this at the pod level. This is defense in depth: even if application validation fails, the network blocks the request.
Dedicated egress proxy: Route all outbound application HTTP traffic through a proxy (Squid, Envoy, or a cloud-managed gateway). The proxy enforces allowlist policy centrally, logs all requests for audit, and provides a single enforcement point. This architecture makes SSRF exploitation far harder even when application-level validation has gaps.
Yes, and the problem is expanding. Microservice architectures increase the SSRF attack surface because more services accept URLs as input and because internal services communicate over HTTP without mTLS. In 2024, Verizon's Data Breach Investigations Report found that web application attacks accounted for 26% of all confirmed breaches (Verizon DBIR 2024, 2024). SSRF sits squarely inside that category.
GraphQL APIs introduce a specific SSRF variant. Some implementations support field-level URL fetching in resolvers. If a GraphQL mutation accepts a URL to fetch and process, every resolver handling that URL is a potential SSRF vector. Our article on API authentication vulnerabilities covers the intersection of GraphQL and server-side injection in detail.
Serverless functions are also vulnerable. AWS Lambda functions can reach the EC2 container credentials endpoint at http://169.254.170.2 (different from EC2's standard metadata address), which returns container-scoped credentials. The exploitation chain is identical: SSRF in the Lambda function, fetch the credential endpoint, exfiltrate keys. Functions running with overly broad IAM roles make this especially damaging.
Service meshes like Istio or Linkerd add mTLS between services, which limits what an SSRF attack can reach internally. But most organizations have not fully deployed a service mesh. Internal APIs commonly run without authentication, operating on the assumption that only trusted internal services can reach them. That assumption fails the moment any edge service has an SSRF bug.
SSRF is not a theoretical risk. It was the root cause of one of the largest financial services data breaches in history. It consistently appears in HackerOne and Bugcrowd critical-severity reports. It gets worse as applications adopt more URL-fetching features and cloud infrastructure becomes the default deployment environment.
Take these steps this week. First, audit every endpoint in your application that accepts a URL, hostname, or IP address. Document each one. Assess whether it validates the destination before fetching.
Second, check your AWS account for instances running IMDSv1. A simple CLI query reveals the exposure: aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,MetadataOptions.HttpTokens]'. Any instance returning optional is vulnerable to metadata credential theft.
Third, run an SSRF-specific scan. Automated tooling catches what manual code review misses, particularly blind SSRF and cloud metadata access across the full application surface. Our AI-powered security audit covers all major SSRF variants including bypass techniques and serverless credential endpoints.
Fourth, review egress firewall rules. Confirm application servers cannot reach 169.254.169.254, 169.254.170.2, or RFC 1918 private ranges that host management interfaces and internal APIs.
SSRF is fixable. It requires discipline in input validation, correct HTTP client configuration, and layered network controls. The organizations that get breached are consistently those that treated URL validation as a minor implementation detail. It is not.
Full-stack developer and AI architect with years of experience shipping production applications across SaaS, mobile, and enterprise. Gareth built Agentik {OS} to prove that one person with the right AI system can outperform an entire traditional development team. He has personally architected and shipped 7+ production applications using AI-first workflows.

Cloud Misconfigs: Top 10 AWS and GCP Mistakes
82% of cloud breaches trace to misconfigurations. Here are the top 10 AWS and GCP mistakes we find in every audit and how to fix them.

API Auth Vulnerabilities: OWASP Guide 2026
Broken API authentication is OWASP API2:2023. Real audit findings: JWT attacks, OAuth misconfigs, and API key leaks causing breaches.

OWASP Top 10 2025: What Changed, What Breaks
The OWASP Top 10 got a major refresh. Here's what moved, what's new, and the vulnerabilities that still plague most web apps in 2025 and 2026.
Stop reading about AI and start building with it. Book a free discovery call and see how AI agents can accelerate your business.