Huntress Acquires Inside Agent: A New Era for Identity ProtectionFree Trial
Back to Blog
Application Security

Server-Side Request Forgery in Modern Web Applications

SSRF has quietly become one of the most impactful web vulnerabilities. The Capital One breach in 2019 — 100 million customer records — started with an SSRF vulnerability that allowed the attacker to q…

30 Mar 20262 min read0 views

Introduction

SSRF has quietly become one of the most impactful web vulnerabilities. The Capital One breach in 2019 — 100 million customer records — started with an SSRF vulnerability that allowed the attacker to query the EC2 metadata service and steal IAM role credentials. That single vulnerability class has caused more damage in cloud environments than almost any other.

Why SSRF Is So Dangerous in Cloud Environments

Cloud instance metadata services are reachable at 169.254.169.254 from any process running on the instance. If your application makes HTTP requests based on user input — fetching a URL, importing a file from a URL, generating a thumbnail from a URL — an attacker can point that request at the metadata service and retrieve temporary credentials, instance identity documents, and other sensitive configuration.

AWS IMDSv2 mitigates this by requiring a PUT request with a hop limit of 1 to obtain a session token before the metadata service responds. Enforce IMDSv2 on all your EC2 instances and Lambda functions. But do not stop there — SSRF can target internal services, databases, and other cloud APIs, not just the metadata service.

Beyond Cloud Metadata

Internal port scanning through SSRF reveals services running behind the firewall. Redis, Elasticsearch, Memcached, and internal admin panels are common targets. An attacker who can make your server send HTTP requests to arbitrary internal addresses can map your entire internal network topology.

Blind SSRF — where the attacker does not see the response but can observe timing differences or DNS lookups — is harder to exploit but still dangerous. It allows internal service enumeration and can be combined with other vulnerabilities for full exploitation.

Effective Defenses

Input validation is necessary but insufficient. Validate URLs against an allowlist of permitted domains and schemes. But remember that DNS rebinding can bypass URL validation — a hostname that resolves to a public IP during validation but resolves to 169.254.169.254 when the actual request is made.

The most robust defense is a combination: URL allowlisting, DNS resolution verification (resolve the hostname and check the IP before making the request), network-level controls (a firewall rule that blocks outbound traffic to 169.254.169.254 from your application servers), and IMDSv2 as a last line of defense.

If your application needs to fetch arbitrary URLs (like a link preview feature), run that functionality in an isolated network segment with no access to internal resources or cloud metadata.

Comments

Keep Reading

Explore Related Topics and Insights

Insider Threat Detection Without Becoming Big Brother
EMERGING THREATS

Insider Threat Detection Without Becoming Big Brother

Insider threat programs have a PR problem. Announce that you are monitoring employee behavior and you will get pushback from HR, legal, works councils, and the employees themselves. And they are not w…

S

Spakto Team

30 Mar 2026
Read article →
Cloud Security Posture Management: Choosing and Deploying CSPM
CLOUD SECURITY

Cloud Security Posture Management: Choosing and Deploying CSPM

When I ran a cloud security assessment for a logistics company last year, we found 847 misconfigurations across their AWS and Azure environments. Seventeen of them were critical — including an S3 buck…

S

Spakto Team

30 Mar 2026
Read article →
Secure Code Review: What Senior Engineers Actually Look For
APPLICATION SECURITY

Secure Code Review: What Senior Engineers Actually Look For

Automated tools find about 40% of security vulnerabilities in code. The other 60% — business logic flaws, race conditions, authorization bypasses, and subtle injection vectors — require human eyes. Af…

S

Spakto Team

30 Mar 2026
Read article →
Threat Hunting: Moving From Reactive to Proactive Security
THREAT INTELLIGENCE

Threat Hunting: Moving From Reactive to Proactive Security

Your SIEM generates alerts. Your EDR generates alerts. Your firewall generates alerts. You triage them, you respond to them, you close them. And then one day you discover that an attacker has been in…

S

Spakto Team

30 Mar 2026
Read article →
Securing the Software Build Pipeline: From Code to Production
APPLICATION SECURITY

Securing the Software Build Pipeline: From Code to Production

Your CI/CD pipeline is the most privileged system in your organization. It has access to source code, secrets, production credentials, cloud provider APIs, and the ability to deploy code that your use…

S

Spakto Team

30 Mar 2026
Read article →
Building a Security Culture That Outlasts Your CISO
EMERGING THREATS

Building a Security Culture That Outlasts Your CISO

I have seen security programs thrive under one CISO and collapse under their successor. I have seen organizations where security is everyone's responsibility and organizations where it is "the securit…

S

Spakto Team

30 Mar 2026
Read article →
Zero-Day Markets: The Economics of Vulnerability Trading
EMERGING THREATS

Zero-Day Markets: The Economics of Vulnerability Trading

A zero-day exploit for iOS full-chain remote code execution with persistence is worth between $1 million and $2.5 million on the private market. An Android equivalent fetches $2 to $2.5 million. A Chr…

S

Spakto Team

30 Mar 2026
Read article →
OT/ICS Security: Bridging the IT-OT Divide
EMERGING THREATS

OT/ICS Security: Bridging the IT-OT Divide

I spent the first half of my career in IT security and the last decade increasingly focused on operational technology. The cultural divide between IT and OT is wider than the technical one, and until…

S

Spakto Team

30 Mar 2026
Read article →