Est.

Server-Side Request Forgery in Cloud-Hosted SaaS Environments

Cloud metadata endpoints become the keys to customer data when SSRF exploits misconfigured services.

Correspondent · · 14 min read · Updated
Cover illustration for “Server-Side Request Forgery in Cloud-Hosted SaaS Environments”
Verified Vulnerabilities & Exploits · August 13, 2026 · 14 min read · 3,167 words

The definition of SSRF is deceptively benign. An attacker tricks a server into making an outbound HTTP request on their behalf, borrowing the server's network position and its implicit trust with other services. Think of it like convincing a security guard to fetch your mail from the restricted back office: he has the badge, you have the request. In a traditional data center, that means reaching an internal wiki or an admin panel. In a cloud environment, it means something categorically different.

Every compute instance running in AWS, GCP, or Azure has access to a metadata service. The address is predictable, the service is reachable by any process on the instance, and it returns credentials by design. That's how instance identity works. Which means a server-side request that reaches that endpoint doesn't just leak internal data; it leaks the authenticated identity of the infrastructure itself.

Here's how the chain actually runs. Any feature that fetches a URL influenced by user input is a candidate: webhook endpoints, URL preview generators, PDF renderers, image importers, integrations that proxy third-party API calls. In a mature SaaS product, there are usually more of these than the engineering team has catalogued. The attacker supplies a URL pointing to the cloud metadata service. The server fetches it. The response contains temporary IAM credentials for the role attached to the instance. Now the attacker has an access key, a secret, and a session token, valid and authenticated, carrying whatever permissions the IAM role holds. They don't need to be inside the network anymore. From there, it's cloud API calls from outside the perimeter: listing S3 buckets, querying Secrets Manager, describing EC2 instances. The blast radius at that step is determined entirely by what the role is permitted to do. Depending on those permissions, the attacker can assume more privileged roles, traverse account boundaries, or pull customer data directly. The entire chain, from first request to exfiltration, can complete before any conventional alert fires.

Blind SSRF complicates the picture in a way that trips up a lot of defenders. When no response body is returned, the chain appears blocked. But out-of-band signals, DNS callbacks and timing differences, still confirm the vulnerability. An attacker working blind can map internal infrastructure and chain the finding with other issues even without data in the response. It's a quieter attack, which makes it more dangerous in practice.

The bypass techniques that defenders most consistently underestimate deserve specific attention. Blocklists that reject the metadata IP can be circumvented by encoding that address in decimal notation. DNS rebinding allows a domain to resolve to a permitted IP during validation, then rebind to an internal address when the actual fetch occurs. Alternate URL schemes like file:// or gopher:// bypass allowlists that only check for HTTP. Redirects from attacker-controlled external domains to internal addresses slip past controls that validate the original URL but leave the final destination unchecked. Each technique changes the attack signature while leaving the underlying vulnerability intact.

In a multi-tenant SaaS environment, the stakes compound further. An SSRF that reaches internal services doesn't just threaten the attacker's own tenant. It can become the mechanism by which one customer's request reads another's data, turning an infrastructure vulnerability into a tenant isolation failure. That's the kind of outcome that ends companies.

Diagram: The SSRF Escalation Chain: From User Input to Cloud Breach. Visualizes: Illustrate the step-by-step escalation chain of a cloud SSRF attack as described in the article.

What the Capital One breach shows about how this chain plays out at scale

The 2019 Capital One breach is the clearest large-scale demonstration of this chain executing against a real production environment. The facts are precise enough to be instructive.

An attacker exploited an SSRF vulnerability in a web application firewall instance. The WAF carried an IAM role with permissions far broader than a WAF instance needed. Using the SSRF, the attacker queried the EC2 metadata service, retrieved temporary credentials, and used those credentials to access S3 buckets containing data tied to approximately 106 million credit card applicants in the United States and Canada. Roughly 30 gigabytes of structured and semi-structured data, much of it unencrypted, was exfiltrated.

The detection gap is the detail that gets underweighted in retrospectives. The attack began in late March 2019 and wasn't discovered until mid-July. Nearly four months of undetected access. SSRF exploitation doesn't announce itself through conventional log patterns, and the credential use that followed blended into normal API activity unless you were specifically watching for enumeration behavior against an instance's established baseline. Most environments weren't watching for that. A lot still aren't.

Three conditions made the breach possible, and none of them existed in isolation. AWS IMDSv1 required no authentication, so any HTTP request to the metadata IP returned credentials without session negotiation. The IAM role attached to the WAF had permissions appropriate for a far more privileged service. And no compensating controls existed to interrupt the chain at any step: the metadata endpoint wasn't blocked at the network layer, IMDSv1 wasn't disabled, and the role's permissions hadn't been scoped to the minimum required.

AWS responded by releasing IMDSv2, which requires a session token obtained via a PUT request before credentials are returned. The session-oriented authentication step breaks naive SSRF exploitation of the metadata endpoint because a simple GET to the metadata IP no longer returns credentials directly. The remediation was meaningful and architecturally sound. But the question it raised was obvious: if the fix existed, why was adoption still incomplete years later?

Why IMDSv2 adoption is still incomplete — and why it wouldn't have been enough anyway

Diagram: IMDSv2 Enforcement: Where the Protection Ends. Visualizes: Show the stark gap in IMDSv2 adoption and the limits of its protection, using three concrete facts from the article.

Seven years after Capital One, only 49% of EC2 instances enforce IMDSv2. The improvement from where adoption started is real. The remaining attack surface is still enormous.

The age gradient makes this worse. Only 14% of instances older than two years enforce IMDSv2. The longest-running infrastructure, which is the most embedded, the most interconnected, and in many environments the most privileged, is the least protected. Migration requires testing, operational confidence, and deliberate action. In organizations managing hundreds or thousands of instances, the oldest ones are often the last to be touched. Sometimes they're never touched at all, because nobody wants to be the person who broke something that had been quietly running for three years.

But even where IMDSv2 is enforced, the scope of protection is narrower than most teams realize. It closes one path in the escalation chain. It does not eliminate the SSRF vulnerability itself. It does not restrict what an instance role can do once credentials are in use. And it does nothing to protect against pivoting to unauthenticated internal services, which remains viable regardless of which version of the metadata service is running.

The credential hygiene problem that IMDSv2 doesn't touch is substantial on its own. Per Datadog's 2025 State of Cloud Security report, 59% of AWS IAM users have an access key older than one year. Long-lived credentials accumulate in CI/CD pipelines, configuration files, developer machines, and container images. An SSRF that reaches a misconfigured deployment artifact or an exposed environment file has no need to touch the metadata service at all. The credentials are just sitting there.

The remaining exposure includes credentials hardcoded in source code or Docker images, secrets leaked through CI/CD pipeline logs, credentials exposed alongside an SSRF by a memory safety bug or insecure deserialization, and internal services like Redis, Elasticsearch, and internal admin APIs that remain reachable via SSRF regardless of metadata service configuration.

The practical implication: a SaaS environment that has enforced IMDSv2 across all instances, rotates access keys aggressively, and still allows application servers to make unrestricted outbound HTTP requests to internal network ranges is carrying meaningful SSRF risk. The fix addresses one vector. The vulnerability class and the internal service exposure remain.

Venn diagram: IMDSv2 Protection: What It Fixes vs. What Remains. Compares IMDSv2 Closes and Still Exposed; overlap: Shared Risk.

How the SSRF threat landscape accelerated between 2023 and 2024

SonicWall's 2025 Cyber Threat Report measured a dramatic increase in SSRF attacks from 2023 to 2024. Citing the number without unpacking it misses the point.

The primary driver is AI-assisted tooling that automates reconnaissance and exploitation steps that once required skilled manual effort: probing targets for SSRF surface, testing bypass techniques at scale, identifying blind SSRF through DNS callback analysis, chaining findings with IAM enumeration. Each of these steps can now be executed with substantially less operator skill than was required even two years ago. The attack surface hasn't grown proportionally. The population of attackers who can reach it has. Weaponized SSRF used to require someone who knew what they were doing. Now it increasingly doesn't.

The volume increase is accompanied by confirmed exploitation against consequential targets. CISA added CVE-2025-61882, an SSRF vulnerability weaponized by the Cl0p ransomware group, to the Known Exploited Vulnerabilities catalog in 2025, with a tight federal patching deadline. That addition signals confirmed exploitation against U.S. government systems, not proof-of-concept research. The Cl0p case is instructive because it illustrates SSRF functioning as ransomware's initial access mechanism, not solely a data exfiltration vector. The chain from exploitable request to deployed ransomware is operationally viable, and it's being used.

SSRF is not confined to bespoke SaaS code, either. Enterprise platforms that SaaS companies integrate with, including widely deployed tools across workflow automation, analytics, and integration middleware, have surfaced SSRF findings alongside other vulnerability classes. A SaaS team that has hardened its own codebase but relies on third-party components for PDF generation, URL preview, or API proxying is carrying SSRF risk in code it didn't write and doesn't fully control.

IBM X-Force's 2025 cloud threat intelligence observes that cloud-specific attack patterns are maturing, with credential theft and lateral movement increasingly chained from initial access vectors like SSRF. Attackers have operationalized the escalation chain. Signature-based blocking can't keep pace because bypass techniques change the signatures constantly; the underlying behavior pattern is more durable than any specific indicator. The defensive response has to match that operational maturity.

The controls that break the escalation chain at each step

No single control breaks this chain. That's the core of it. Defense-in-depth means the attacker must defeat multiple independent controls, not just one, and those controls need to be positioned at each stage of the escalation rather than clustered at the front door.

Start with the code. If a feature fetches URLs, enumerate the legitimate destinations and allowlist them explicitly. Reject anything outside that set. Blocklists, particularly those attempting to block metadata IPs or loopback addresses by pattern, are the wrong primary control. The catalog of bypass techniques is long and actively maintained; for every blocklist pattern, an evasion exists. The more structurally sound approach is to avoid passing raw user-supplied URLs to HTTP client libraries at all. An indirect reference, fetching a resource identified by an internal ID rather than a URL the user supplied, removes the attacker's ability to redirect the request to an arbitrary destination. Where indirect references aren't possible, a tightly scoped allowlist is the correct fallback.

At the network layer, enforce IMDSv2 on every instance and disable IMDSv1 explicitly. Don't rely on the default configuration. As a defense-in-depth measure, block outbound access to the metadata IP at the VPC or firewall layer as well, so a bypassed application control cannot reach it anyway. Both controls can coexist, and each covers the failure mode of the other.

Then look at what the credentials retrieved via SSRF could actually do. The Capital One breach turned on a WAF instance carrying an IAM role with permissions appropriate for a far more privileged service. That anti-pattern is widespread. Least privilege applied to IAM roles means a PDF renderer, an image proxy, and a webhook processor each carry only the permissions their specific function requires, scoped as narrowly as possible. Regular IAM permission audits catch the role creep that accumulates as features expand and permissions are added without corresponding review. Long-lived access keys should be rotated aggressively; where instance roles suffice, they are preferable to static credentials precisely because they're ephemeral by design.

Internal services require explicit attention. Network position should not equal identity. Redis, Elasticsearch, internal admin APIs, internal management planes: all of these should require explicit credentials regardless of which instance is making the request. Network segmentation at the VPC level, enforced through security groups and network ACLs rather than application-layer controls alone, means a compromised application server can't freely communicate with infrastructure it has no legitimate reason to reach.

Detection is the layer that closes the loop. Log outbound HTTP requests from application servers and alert on requests to metadata IPs, RFC-1918 ranges, or unexpected external destinations. This requires that logging is actually configured, that the logs are collected, and that alerting rules exist and are tested. Behavioral detection for unusual IAM API calls requires establishing a baseline of what each instance normally does, then alerting on deviation. Enumeration calls from an instance that doesn't normally make them are worth investigating. The Capital One breach ran for nearly four months in part because this kind of behavioral monitoring wasn't in place. For blind SSRF specifically, out-of-band detection infrastructure using DNS callback services is necessary because the exploitation leaves no response body to parse. Detecting that an internal server is making DNS lookups for attacker-controlled domains is often the only signal you get.

Why automated scanning misses most of the SSRF risk in a real SaaS environment

Automated scanners handle basic, reflected SSRF reasonably well. When the response body is returned directly, the payload is a URL parameter, and the scanner can observe the difference between a request reaching an internal address and one that doesn't, the finding surfaces. That's the easy case. Real SaaS environments contain mostly the hard cases.

Blind SSRF requires out-of-band detection infrastructure and the ability to reason about whether an observed DNS callback represents an exploitable path. A scanner that sees no response body has no signal to parse. It reports nothing. The vulnerability exists; the tool doesn't find it.

SSRF buried in business logic is structurally invisible to a scanner probing HTTP parameters. Webhook endpoint configuration screens, integration setup flows, async job processors that fetch URLs hours after the initial request: all of these require the tester to understand the application's behavior, not just its surface parameters. A scanner doesn't know that a URL stored during account setup will be fetched server-side by a background job at 3 a.m. Nobody told it to look there.

Filter bypass paths require deliberate, iterative testing. A scanner that receives a 403 from a blocklist doesn't automatically try decimal encoding, DNS rebinding, alternate URL schemes, or redirect chains. Bypass testing requires someone who understands the bypass technique catalog and applies it methodically against each control they encounter.

Second-order SSRF separates the injection point from the execution point entirely. A URL is stored in the database through one request and fetched server-side through a completely different code path. The scanner tests the first request, sees no immediate SSRF behavior, and moves on.

The chain attack problem is perhaps the most consequential gap. Two individually low-severity findings, a blind SSRF with no obvious impact and an overly permissive IAM role, combine into a critical breach path. Automated tools score each finding independently. They never connect them. A human tester reasoning about the environment as a system, rather than as a collection of isolated findings, makes that connection. It's the difference between cataloguing individual puzzle pieces and seeing the picture they form. The picture is what matters.

Whitebox access changes what's achievable significantly. A tester with source code can trace every code path that makes outbound HTTP calls, identify async processors and background jobs a scanner never touches, and read IAM policy documents to understand what harvested credentials would actually enable. None of that is available to a blackbox scanner working from the outside.

Verizon's 2025 Data Breach Investigations Report documented a 34% year-over-year increase in exploitation of vulnerabilities. The gap between what automated tools catch and what attackers find is real, persistent, and not closing.

What rigorous SSRF testing looks like in a cloud SaaS environment

Rigorous SSRF testing in a cloud SaaS environment is not a scan. It is a structured, manual-led engagement with specific objectives tied to the escalation chain.

It begins with attack surface enumeration from the inside. A tester with access to the codebase maps every code path that initiates outbound HTTP requests: synchronous and asynchronous, triggered by user input directly and triggered by stored data fetched later. This inventory is the foundation. Without it, the test is sampling, not coverage.

Each surface is then tested for exploitability with the full bypass technique catalog applied: decimal encoding, octal encoding, IPv6 representation of the metadata IP, DNS rebinding, redirect chains, alternate URL schemes, each tested against each identified control. The goal is to find the control gap that a determined attacker would find through the same systematic enumeration. If the tester doesn't find it, someone else will.

Blind SSRF surfaces require out-of-band infrastructure. A controlled DNS callback server allows the tester to detect SSRF that returns nothing to the application response. Without this infrastructure, blind SSRF is invisible. Confirming its existence is the prerequisite for reasoning about whether it can reach the metadata endpoint or internal services.

IAM policy review runs in parallel with application testing. What permissions does the role attached to each tested instance actually carry? What can an attacker do with those credentials if they retrieved them via the identified SSRF? The severity of each finding is determined by this intersection, not by the SSRF finding alone. A blind SSRF against an instance with a highly permissive role is a critical finding. A reflected SSRF against an instance with a read-only role scoped to a single bucket is a lower-severity one. The policy defines the blast radius.

Internal network reachability is mapped explicitly. Which services are accessible from which instances? What authentication do those services require from internal callers? The pivot opportunities available to an attacker who has compromised one application server are only knowable if someone has mapped the internal network policy as it actually exists, not as it was designed. Those two things are often different.

Findings are reported as chains. A blind SSRF and an overly permissive IAM role reported separately produce two medium-severity tickets. Reported together, with the full escalation chain documented from exploitable request to credential harvest to specific API calls the attacker can make, they produce a critical finding that accurately represents the risk. That framing isn't editorializing; it's an accurate representation of how the breach would actually occur.

Firms specializing in cloud-native penetration testing, such as Cobalt, CrowdStrike Services, NCC Group, or Rapid7, bring structured methodology that spans application layer, IAM policy review, and internal network mapping within a single engagement. The value is precisely the chain reasoning that automated tools cannot perform: connecting an application-layer finding to an infrastructure-layer permission to a data-layer exposure, and presenting it as the unified risk that it is.

The controls exist. The testing methodology is well-established. What SSRF exploitability in cloud SaaS environments ultimately reflects is whether an engineering team has verified that the chain is actually broken, at every step, under adversarial conditions. That verification is not a scan, and the Capital One timeline makes clear what deferring it costs.

Sources

  1. gecko.security
  2. wiz.io
  3. datadoghq.com
  4. appsecure.security
  5. medium.com

More in Verified Vulnerabilities & Exploits