main logo icon

Published on

November 19, 2026

|

24 min read

Server-Side Request Forgery (SSRF): Real Examples, How Testers Find It and How to Fix It

What server-side request forgery (SSRF) is, the basic and blind variants, why cloud metadata services raise the stakes, seven documented cases from court filings, vendor advisories and CISA KEV, how a penetration test proves it, and the fixes.

Arafat Afzalzada

Arafat Afzalzada

Founder

Web App Security

Summarize with AI

ChatGPTPerplexityGeminiGrokClaude

TL;DR

Server-side request forgery (SSRF) lets an attacker make your server send a request to a destination the attacker chooses. The request arrives with the server's network position and identity, so it reaches internal services, admin interfaces and cloud metadata services that the attacker cannot reach directly. SSRF is CWE-918. It had its own category in the OWASP Top 10 in 2021 (A10), is part of A01 Broken Access Control in the OWASP Top 10:2025, and is API7 in the OWASP API Security Top 10 2023. As of 18 November 2026, CISA's Known Exploited Vulnerabilities catalog maps 24 entries to CWE-918. Eleven of them were added in 2026, and four of those eleven are flaws first published in 2020 or 2021. Seven documented cases show the range: Capital One (2019), Adminer and cloud credentials (2021), Microsoft Exchange ProxyLogon (2021), GitLab, edge appliances from Ivanti, SonicWall and Cisco, Oracle E-Business Suite and MLflow (2026). The fixes that hold are allow-lists of destinations, validating the resolved address and connecting to that address, turning off redirects, default-deny egress from the component that fetches, a hardened metadata service and least-privilege instance roles. Filtering rules alone do not close it.

Server-side request forgery (SSRF) is a vulnerability that lets an attacker make your server send a request to a destination the attacker chooses. The request arrives with the server's network position and identity, not the attacker's, so it reaches things the attacker cannot reach directly: internal services, administrative interfaces and the cloud metadata service that hands out the server's credentials.

The class is small in the vulnerability counts and large in the incident record. CISA's Known Exploited Vulnerabilities catalog maps 24 entries to CWE-918, the SSRF weakness, as of 18 November 2026, and 11 of those 24 were added in 2026. OWASP gave SSRF its own category in the Top 10 in 2021 and wrote then that "the severity of SSRF is becoming higher due to cloud services and the complexity of architectures."

Quick answer. SSRF happens when an application fetches a URL, hostname or file reference that a user can influence, without controlling where the request ends up. It is found by listing every feature that makes the server fetch something, pointing each one at a listener the tester controls, and then checking whether internal addresses, redirects, DNS tricks and the cloud metadata service are reachable through it.

What is server-side request forgery (SSRF)

MITRE's definition of CWE-918 is the most precise: "The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination." OWASP's 2021 description adds the consequence: the flaw "allows an attacker to coerce the application to send a crafted request to an unexpected destination, even when protected by a firewall, VPN, or another type of network access control list (ACL)."

Almost every modern application fetches something on a user's behalf: an avatar from a link, a preview of a pasted URL, an event posted to a customer's webhook, a PDF rendered from HTML. In each case the user supplies a destination and the server makes the request. In the harmless illustration below, the second address is the link-local address that cloud providers use for their instance metadata services, the same one OWASP uses in its own example scenarios.

Codejson
1Intended use:    POST /api/profile/avatar   {"avatarUrl": "https://images.example.com/me.jpg"}
2Forged request:  POST /api/profile/avatar   {"avatarUrl": "http://169.254.169.254/"}

Nothing about the second request is malformed; the application fetched what it was given. The danger is trust by network location. The OWASP Web Security Testing Guide describes the systems behind an application server: they "often have non-routable private IP addresses or are restricted to certain hosts. Since they are protected by the network topology, they often lack more sophisticated controls." A database console with no password, an internal admin API and a metadata endpoint were all safe as long as only the server could reach them. SSRF lends that reach to an outsider.

The main variants of SSRF: what each reaches and the fix

The variants differ in two things: where the destination enters the application, and what the attacker gets back. The OWASP API Security Top 10 names the features that make SSRF more common: "Webhooks, file fetching from URLs, custom SSO, and URL previews." How each variant is tested is covered in the testing section below.

Variant

What it reaches

The fix

Basic SSRF (response returned)

Internal HTTP services, admin interfaces, local files, with the content shown to the attacker

Allow-list of destinations; HTTP and HTTPS only; do not return raw responses

Blind SSRF

The same destinations, without a visible response; state-changing internal endpoints

The same as basic SSRF, plus default-deny egress for the fetching component

Redirect-based SSRF

Internal addresses, behind a public first URL

Disable redirects, or validate every hop

DNS rebinding

Internal addresses, behind a hostname that passed validation

Validate the resolved address and connect to that address

Parser and encoding confusion

Whatever the filter was meant to block

One maintained parser; normalize addresses before comparing; reject ambiguous URLs

Webhooks, URL previews and import-from-URL

Internal services, often from a background worker at a later time

Public addresses only, pinned connection, isolated fetcher; an allow-list of sources where possible

PDF, image, document and XML processing

Internal resources and local files referenced from inside content; OWASP notes that XML external entity injection "can be exploited to perform a SSRF attack"

Render in a sandbox with no network access; disable external entity resolution in the parser

Cloud metadata service

Temporary credentials for the instance's role

Require IMDSv2 or header checks; least-privilege role; block the address where it is not needed

Proxy, gateway or appliance misrouting

Back-end services that trust the front end

Patch; restrict management interfaces; authenticate between front end and back end

Where SSRF sits in the standards

Standard

Where SSRF sits

What it says

MITRE CWE

CWE-918

Ranked 22nd in the 2025 CWE Top 25, down from 19th the year before

OWASP Top 10:2021

A10:2021, its own category

Added from the community survey, where it ranked first

OWASP Top 10:2025

Part of A01:2025 Broken Access Control

"Server-Side Request Forgery (SSRF) has been rolled into this category"

OWASP API Security Top 10 2023

API7:2023, its own entry

Exploitability rated easy, prevalence common; "The SSRF risk can not always be completely eliminated"

OWASP ASVS 5.0

Requirements 1.3.6, 1.5.3, 13.2.4, 13.2.5 and 15.3.2

Allow-lists for outbound requests, consistent URL parsing, no automatic redirects

In the OWASP Top 10:2025, SSRF is one of the 40 weaknesses mapped to A01:2025 Broken Access Control, so policies and report templates should cite A01:2025 rather than the superseded A10:2021. Our guide to the OWASP Top 10:2025 covers the other categories.

How often SSRF is found and how often it is exploited

SSRF is rare in testing data. Of 1,206 verified findings from 55 Stingrai penetration tests between October 2024 and August 2026, 10 (0.8%) were SSRF, according to our State of Penetration Testing 2026. OWASP's 2021 data showed the same shape, an average incidence rate of 2.72%, which OWASP summed up as "a relatively low incidence rate" with above-average exploit and impact ratings.

The exploitation record for 2026 looks different. For this guide we counted the entries in CISA's Known Exploited Vulnerabilities catalog whose weakness field includes CWE-918, using the catalog's JSON feed at version 2026.11.18, released on 18 November 2026 with 1,786 entries. The count is 24.

  • 11 of the 24 were added in 2026, up to 18 November, and four of those 11 gave US federal agencies three days to remediate. The years 2021 to 2025 added 13 between them.

  • Six of the 14 entries added since January 2025 are old flaws, with CVE IDs from 2019, 2020 or 2021. Two GitLab flaws from 2021 and a Zimbra flaw from 2020 were added in February 2026.

  • 10 of the 24 carry CISA's flag for known use in ransomware campaigns.

CWE-918 entries in the CISA Known Exploited Vulnerabilities catalog by year added

Figure 1: CWE-918 entries in CISA's Known Exploited Vulnerabilities catalog by the year CISA added them, with older flaws highlighted. Source: CISA KEV catalog, version 2026.11.18.

The count follows the weakness ID, not CISA's title: five of the 24 are titled as something else, such as remote code execution, and two entries titled SSRF carry other weakness IDs, as the figure's notes list.

The volume of new SSRF flaws is rising too. Our web application security statistics chart 566 NVD records carrying CWE-918 published in 2025 and 1,920 published in 2026 up to 13 October.

Across the 24, SSRF is exploited where the server that fetches already holds a valuable position: mail servers, remote access and file transfer appliances, virtualization management, source code platforms and ERP systems. Cloud hosting gives almost every application such a position.

Why cloud makes SSRF worse: instance metadata services

Every major cloud gives a virtual machine a way to obtain credentials without storing secrets on disk. MITRE ATT&CK describes it under technique T1552.005: the Cloud Instance Metadata API "is a service provided to running virtual instances that allows applications to access information about the running virtual instance", including "sensitive data such as credentials". It is reached over plain HTTP at a link-local address, 169.254.169.254 on the large providers, that only the instance itself can reach.

That design assumes that every request arriving at the metadata service was made on purpose by software on the instance. SSRF breaks the assumption. The temporary credentials that come back belong to the instance's role and work from anywhere until they expire, so a flaw in one web application becomes access to whatever that role can touch. Each provider has added a protection, described in its own documentation.

Provider

Protection

In the provider's words

The limit

AWS

IMDSv2: a session token obtained with a PUT request, then sent as a header on every call

"PUT requests are rejected if they contain an X-Forwarded-For header", and the token response has "a response hop limit (time to live) of 1" by default

"By default, you can use either IMDSv1 or IMDSv2, or both", unless the instance, image or account requires version 2

Microsoft Azure

A required request header, which Microsoft says "is used as a mitigation against server side request forgery (SSRF) attacks"

Requests "Must contain the header Metadata: true" and "Must not contain an X-Forwarded-For header"

A static header stops only SSRF that cannot set headers

Google Cloud

A required request header

"If you don't provide this header, the metadata server denies your request", and requests with X-Forwarded-For "are automatically rejected"

The same limit as any static header

Sources: AWS's instance metadata documentation, Microsoft's Azure Instance Metadata Service and managed identity documentation, and Google's metadata server documentation.

A static header works because a basic SSRF flaw lets the attacker choose the URL but not the headers. AWS went further when it launched IMDSv2 in November 2019, and its announcement explains why: "AWS analysis found many SSRF vulnerabilities that allow attackers to set arbitrary headers because the SSRF vulnerability impacts the application's own header processing." AWS is careful about the claim it makes for the session design: it "protects against the vast majority of SSRF vulnerabilities." An SSRF flaw that lets the attacker control the method and headers of the forged request can still complete the exchange.

Version 2 only helps where it is required. AWS offers instance, image and account-level settings that make IMDSv2 mandatory, and Amazon Linux 2023 "disables IMDSv1 by default". Adoption has lagged. Datadog's State of Cloud Security study, from data collected in September 2025, found that "49% of EC2 instances have IMDSv2 enforced", up from 32% a year earlier and 7% in 2022, and that "only 14% of instances created over two years ago enforce it." The oldest servers are the least protected.

The metadata service is not the only target, and it is shared. API7:2023 warns that "cloud providers, Kubernetes, and Docker expose management and control channels over HTTP on predictable, well-known paths." And Microsoft states that its metadata service "is not a channel for sensitive data", so secrets placed in metadata or startup scripts are within reach of any SSRF flaw on the host. Wider figures on cloud credential exposure are in our cloud security statistics.

Seven documented SSRF cases and what each one teaches

Case

Year

Variant

What the forged request reached

Primary source

Capital One

2019

Commands passed through a misconfigured firewall; SSRF in AWS's assessment

Credentials for a cloud role, then storage buckets

US DOJ complaint, OCC consent order, AWS letter

Adminer, CVE-2021-21311

2021

Basic SSRF through a redirect

AWS instance metadata credentials

Mandiant, Adminer advisory, CISA KEV

Microsoft Exchange Server, CVE-2021-26855

2021

SSRF used to authenticate as the server

The mail server's own back end

Microsoft, CISA KEV

GitLab, CVE-2021-22175 and CVE-2021-39935

2021; exploited list 2026

Webhook and API features

The internal network around the GitLab server

CVE records, CISA KEV

Ivanti, SonicWall and Cisco appliances

2024 to 2026

SSRF in the device that guards the network

Restricted functions on the appliance

Vendor advisories, CISA

Oracle E-Business Suite, CVE-2025-61884

2025

Unauthenticated SSRF in an ERP component

Resources that Oracle's alert calls sensitive

Oracle Security Alert, CISA KEV

MLflow, CVE-2026-64849

2026

Webhook test with redirect and DNS gaps

Internal and cloud metadata services

MLflow advisory, CISA KEV

1. Capital One: a misconfigured firewall, and a role with too much access

Capital One's account of the incident says that on 19 July 2019 it determined that an outside individual had obtained personal information affecting "approximately 100 million individuals in the United States and approximately 6 million in Canada." An external researcher reported what the company calls a "configuration vulnerability" through its responsible disclosure program on 17 July, and Capital One then began its own investigation.

The criminal complaint filed in the Western District of Washington on 29 July 2019 sets out the mechanics as Capital One reported them to the FBI. "A firewall misconfiguration permitted commands to reach and be executed by that server, which enabled access to folders or buckets of data in Capital One's storage space at the Cloud Computing Company." A file posted online contained three commands. The first "obtained security credentials for an account" whose name, partly redacted in the complaint, ends in "-WAF-Role". The second used that role to list storage buckets, and the third copied data from the buckets the role was permitted to read.

Neither the complaint nor Capital One's statement uses the term SSRF. The attribution comes from Amazon Web Services: in a letter dated 13 August 2019 to Senator Ron Wyden, its chief information security officer wrote that the attack "occurred due to a misconfiguration error at the application layer of a firewall installed by Capital One, exacerbated by permissions set by Capital One that were likely broader than intended", that "we believe a SSRF attack was used", and that "SSRF was not the primary factor in the attack." Three months later AWS released IMDSv2.

On 6 August 2020 the Office of the Comptroller of the Currency assessed an $80 million civil money penalty. Its consent order, whose findings the bank neither admitted nor denied, states that the bank "failed to establish appropriate risk management for the cloud operating environment, including appropriate design and implementation of certain network security controls, adequate data loss prevention controls, and effective dispositioning of alerts."

Lesson. Whatever the exact route through the firewall, what turned that access into the data of about 106 million people was the second failure: the role whose credentials were taken could list more than 700 storage buckets and read from some of them. The complaint also records the detection that was available. The role "does not, in the ordinary course of business, invoke the List Buckets Command", and Capital One's logs showed it doing exactly that.

2. Adminer and UNC2903: the same credential theft, run as a campaign

Adminer is a database administration tool shipped as a single PHP file. Its advisory for CVE-2021-21311, published in February 2021 and rated 7.2 (High), describes a server-side request forgery flaw in versions from 4.0.0 up to, but not including, 4.7.9.

Mandiant reported in May 2022 on a group it tracks as UNC2903 that had turned the flaw into a routine. In June 2021 the group "exploited a server-side request forgery vulnerability, gaining access to victim Amazon Web Services secret keys and subsequently steal data". Mandiant's account of the technique is a textbook case of the redirect variant. Adminer's login form accepts the address of a database server. The attacker entered the address of a server they controlled, that server answered with a redirect to the instance metadata address, and Adminer followed it. The response was not meant to be shown, but "the metadata credentials are displayed directly in the response in an error message."

Two details in the report matter for defenders. The victims were running IMDSv1, and Mandiant confirmed in testing that with IMDSv2 enforced the credentials "are no longer able to be obtained". And detection came late: in Mandiant's testing, Amazon GuardDuty "alerted after data theft was complete from the S3 bucket." CISA added CVE-2021-21311 to its exploited catalog on 29 September 2025, more than four years after the fix.

Lesson. A forgotten administration tool on one cloud server was enough to reach the account's storage, and enforcing IMDSv2 would have broken the chain even with the tool unpatched.

On 2 March 2021 Microsoft reported that it had "detected multiple 0-day exploits being used to attack on-premises versions of Microsoft Exchange Server in limited and targeted attacks", and attributed the campaign with high confidence to a group it then called HAFNIUM and now tracks as Silk Typhoon. Four vulnerabilities were involved. The first was CVE-2021-26855, which Microsoft describes as "a server-side request forgery (SSRF) vulnerability in Exchange which allowed the attacker to send arbitrary HTTP requests and authenticate as the Exchange server."

Two of the other three were file-write flaws that required authentication, and Microsoft notes that the attackers "could authenticate by exploiting the CVE-2021-26855 SSRF vulnerability or by compromising a legitimate admin's credentials." The SSRF supplied the authentication, and web shells followed. Microsoft scores CVE-2021-26855 at 9.1 (Critical); Exchange Online was not affected.

CISA maps two more Exchange entries to CWE-918, and in 2022 Microsoft saw CVE-2022-41040 chained to a code execution flaw "in fewer than 10 organizations globally."

Lesson. SSRF does not need a cloud to be critical. A front end that forwards requests to a back end, with the back end trusting whatever the front end sends, is the same weakness inside a single product. A report that rates such an SSRF as low because no data came back has missed what the request can be combined with.

4. GitLab: two webhook-era flaws from 2021, added to the exploited list in 2026

GitLab's record for CVE-2021-22175 describes a flaw in a feature built to make outbound requests: "When requests to the internal network for webhooks are enabled, a server-side request forgery vulnerability in GitLab affecting all versions starting from 10.5 was possible to exploit for an unauthenticated attacker even on a GitLab instance where registration is disabled". The record for CVE-2021-39935 describes a second route: "Unauthorized external users could perform Server Side Requests via the CI Lint API". GitLab rated both as medium severity and fixed them in 2021.

CISA added CVE-2021-39935 to its exploited catalog on 3 February 2026 and CVE-2021-22175 on 18 February 2026.

GitLab's current documentation on outbound requests shows a mature control: webhook requests to local network addresses are refused unless an administrator allows them, cloud metadata endpoints are blocked "regardless of the other outbound request settings", and DNS rebinding protection is "enabled by default."

Lesson. A self-hosted source code platform sits next to build systems, artifact stores and deployment credentials, so its network position is worth more than most, and unpatched internal tools do not age out of risk: two flaws that scored as medium in 2021 were on a government exploited list more than four years later.

5. Ivanti, SonicWall and Cisco: SSRF in the appliance at the edge

Remote access and communications appliances accept requests from the internet and hold a trusted position inside the network. Three vendors' advisories show what SSRF means there.

  • Ivanti Connect Secure, January 2024. The record for CVE-2024-21893, rated 8.2 (High), describes "A server-side request forgery vulnerability in the SAML component" that "allows an attacker to access certain restricted resources without authentication." CISA added it to the exploited catalog on 31 January 2024, the day it was published, and the same day a supplemental direction told federal agencies to disconnect the products by 2 February.

  • Cisco Unified Communications Manager, June 2026. Cisco's advisory for CVE-2026-20230 describes an SSRF open to "an unauthenticated, remote attacker" in which "A successful exploit could allow the attacker to write files to the underlying operating system that could be used later to elevate to root." The base score is 8.6, and Cisco rated the advisory Critical "rather than High as the score indicates" for that reason. Cisco's update of 1 July 2026 says it "became aware of active exploitation" in June.

  • SonicWall SMA1000, July and September 2026. SonicWall's first advisory, on 14 July 2026, covers CVE-2026-15409, an SSRF in the appliance's Work Place interface through which "A remote unauthenticated attacker could potentially cause the appliance to make requests to unintended location." Its second, on 1 September 2026, covers CVE-2026-83548, a "Pre-authentication SSRF" caused by "an unintended alternate access path". SonicWall scores both at 10.0, pairs each with a code execution flaw in the management console that requires authentication, and reports active exploitation of both. The second advisory lists the hotfix versions that fixed the first as affected.

Lesson. On an edge appliance, SSRF turns an unauthenticated request into one that the device's internal functions trust, and here it sat beside flaws that lead to code execution or root. Two SSRF fixes in seven weeks on the same interface show that patching one path does not prove the design is closed.

6. Oracle E-Business Suite: an unauthenticated SSRF in the system of record

On 11 October 2025 Oracle published a Security Alert for CVE-2025-61884 in Oracle E-Business Suite versions 12.2.3 to 12.2.14. The alert says the vulnerability "is remotely exploitable without authentication" and that, if exploited, it "may allow access to sensitive resources." The CVE record places it in the Runtime UI component of Oracle Configurator and scores it 7.5 (High), with "unauthorized access to critical data" as the impact.

Oracle's alert does not use the term SSRF. CISA's catalog does: it added the CVE on 20 October 2025 as an "Oracle E-Business Suite Server-Side Request Forgery (SSRF) Vulnerability", and flags it for known use in ransomware campaigns.

Lesson. ERP systems hold the data an extortion group wants, and a vendor's advisory may never say "SSRF", so track exposure by product and by CISA's catalog, not by keyword.

7. MLflow: a validation check that pinned nothing

MLflow is an open source platform for managing machine learning models and AI applications. Its advisory for CVE-2026-64849, published on 17 August 2026 and rated 9.3 (Critical), is the most instructive recent write-up of how an SSRF defense fails.

The product had a guard that resolved each webhook hostname and rejected addresses that were not public. The advisory explains why that was not enough: the guard "is bypassable: delivery follows HTTP redirects" and "never pins the validated IP." A webhook pointed at a public server passed the check, and that server could redirect the request inward; the hostname was also resolved again for the connection, which leaves room for DNS rebinding. A test endpoint returned the response body to the caller, and on a default server without authentication it needed no credentials. The CVE record summarizes the result as "allowing attackers to reach internal or cloud metadata services". The fix shipped in version 3.15.0, and CISA added the CVE to its exploited catalog on 19 August 2026, two days after the advisory.

Lesson. Checking the URL is not the same as controlling the connection: the check has to cover every hop, and the client has to connect to the address that was checked. Tools that data science teams stand up quickly, often with a cloud role attached and authentication left off, are a growing part of the SSRF attack surface. Our guide to MCP server security assessments covers a neighbouring class of AI tooling where SSRF also appears.

How a penetration test checks for SSRF

The OWASP Web Security Testing Guide files SSRF under input validation as WSTG-INPV-19, with three objectives: identify the injection points, test whether they are exploitable and assess the severity. A thorough check follows the same nine steps on every engagement.

  1. Inventory every feature that makes the server fetch. Beyond URL and hostname fields, that means webhooks, import-from-URL features, link previews, single sign-on metadata URLs, document, image and PDF converters, XML and SVG uploads, and headers a back end may act on.

  2. Confirm the outbound request with a listener the tester controls. Each input is pointed at an external endpoint operated by the tester, which shows which component made the request and from where. For blind SSRF this out-of-band callback is the only evidence there is.

  3. Test which internal destinations are reachable. With the client's agreement on targets, the tester checks whether the feature can reach loopback, private ranges and named internal hosts, and what comes back: a full response, a leaking error, or only a timing difference.

  4. Test how the validation reads URLs and addresses. Where a filter exists, the tester checks how it treats other schemes, ports, credentials embedded in a URL, and the same address written in decimal, octal, hexadecimal or IPv6-mapped form. The aim is not a list of tricks but to learn whether validation and connection use one parser and one canonical address.

  5. Test redirects. The tester's own server answers with a redirect to an internal address. A client that follows it has bypassed any check made on the original URL.

  6. Test the gap between resolution and connection. A hostname under the tester's control returns a public address first and an internal address second. This shows whether the application validates one DNS answer and connects using another.

  7. Test indirect inputs. Uploaded documents, images, XML and HTML destined for a renderer are checked for references the server will fetch, including in background jobs that run after the request has returned. The testing guide warns that injected data may be "used in other functionality such as PDF reports, invoice or order handling, etc., which may be visible to employees or staff but not necessarily to the end user or tester."

  8. Assess the cloud context. The tester checks whether the metadata service is reachable through the flaw, which version and header requirements are enforced, and what the attached role may do. Proof stops where the rules of engagement say, typically at showing that credentials can be obtained and reading the role's policy, without using them against production data. The same rules fix which internal ranges may be probed and which callback domains the tester uses.

  9. Report, then retest. Each finding records the component that fetches, the destinations reached, the response channel, what the existing controls did and, where credentials were obtainable, the role's permissions, so that blind SSRF reaching only an external listener is rated differently from in-band SSRF that returns role credentials. After the fix, the same inputs are tested again, including the redirect and DNS paths.

Our guide to cloud penetration testing rules of engagement covers what each provider allows, and the API penetration testing checklist covers SSRF alongside the other nine API risks.

How to fix SSRF: the controls that hold

The testing guide states the difficulty plainly: SSRF "is known to be one of the hardest attacks to defeat without the use of allow lists that require specific IPs and URLs to be allowed." The controls below are ordered along the path a forged request takes, from the input to the cloud identity behind the server. No single one is sufficient.

Do not accept a destination when the feature does not need one, and use an allow-list where destinations are known. Many fetch features only ever talk to a handful of services. The OWASP SSRF Prevention Cheat Sheet is direct: "Do not accept complete URLs from the user because URL are difficult to validate and the parser can be abused", and "Deny-lists are bypass-prone. Prefer allow-lists." Accept an identifier, look the destination up on the server and build the request there. ASVS 5.0 requirement 1.3.6 asks for the same at Level 2: validating untrusted data "against an allowlist of protocols, domains, paths and ports" before it is used to call another service.

Where any destination must be allowed, validate the resolved address and connect to that address. Webhooks are the standard case. Resolve the hostname, reject private, loopback, link-local and other non-public addresses in IPv4 and IPv6 after normalizing them, and connect to the address that was checked, because, in the cheat sheet's words, "A second, unchecked DNS lookup between validation and connection can bypass these checks". The MLflow case is that sentence in practice.

Turn off redirects. OWASP's 2021 guidance and API7:2023 both say to disable HTTP redirections, and ASVS 5.0 requirement 15.3.2 makes it testable: the back end "is configured to not follow redirects unless it is intended functionality." If a feature needs redirects, each hop goes through the same validation as the first URL.

Restrict schemes and ports, do not hand back raw responses, and use one parser. Allow HTTP and HTTPS only, on the ports the feature needs. OWASP's instruction "Do not send raw responses to clients" turns a full-read flaw into a blind one. And the cheat sheet's rule for parsers is "Reject a URL whose host is not read identically by every parser in play, rather than reconciling the readings."

Isolate the component that fetches and deny outbound traffic by default. API7:2023 puts this first: "Isolate the resource fetching mechanism in your network: usually these features are aimed to retrieve remote resources and not internal ones." Run link previews, importers, renderers and webhook senders in their own network segment, with firewall rules that allow the internet and nothing internal. This is the control that still works when the application code is wrong.

Harden the metadata service. Require IMDSv2 on AWS at the instance, image and account level, and set the hop limit to 1 unless containers on the instance need 2 (AWS defaults it to 2 on images that require IMDSv2, such as Amazon Linux 2023). On every provider, remove secrets from metadata and startup scripts, and block the metadata address from processes that have no reason to call it; Microsoft's documentation suggests local firewall rules for that purpose.

Give instance roles the least privilege that works. This control decides how bad a successful SSRF is. AWS's letter on the Capital One breach makes the point from the provider's side: with a least privilege policy, "there is relatively little an actor has access to once they are authenticated".

Authenticate internal services, and patch the products that fetch. SSRF pays off because internal systems trust anything that arrives from inside; authentication between services removes most of the reward. Mail servers, source code platforms and administration tools that fetch on your behalf need the same patching discipline as your own code.

Six places to stop a forged server-side request, in the order the request meets them

Figure 2: The controls a forged request meets on its way from the input to the cloud identity, with what each one stops and what still gets through. A summary of the OWASP and cloud provider guidance cited in this section.

Why WAF rules alone do not close SSRF

A web application firewall inspects the inbound request, and a filter on it is a deny-list; OWASP's 2021 guidance says "Do not mitigate SSRF via the use of a deny list or regular expression." In the Adminer and MLflow cases the supplied URL pointed at a public server, and the internal address appeared only in a redirect or a DNS answer the firewall never saw. Stored webhook URLs are fetched later by background workers it never sees either. Filtering rules are a useful extra layer and a source of alerts, not a substitute for control over where the server can connect.

How to detect SSRF: logging and egress telemetry

Detection for SSRF means watching what your servers request, which most monitoring is not built to do. Five sources carry the signal; for third-party products, the vendor's advisory often adds log indicators of its own.

Application logs for every server-side fetch. Record the feature, the acting user or tenant, the requested URL, the address it resolved to, each redirect hop and the response status. Alert on fetches that resolve to private, loopback or link-local addresses, including blocked ones.

Network egress logs. OWASP's 2021 guidance asks teams to "Log all accepted and blocked network flows on firewalls". One documented blind spot: AWS states that VPC flow logs do not capture "Traffic to and from 169.254.169.254 for instance metadata", so requests to the metadata service have to be watched another way.

Metadata service metrics. AWS's CloudWatch metric MetadataNoToken counts calls to the instance metadata service using IMDSv1; once software has moved to version 2 it should be zero.

Credential use from the wrong place. Amazon GuardDuty's InstanceCredentialExfiltration.OutsideAWS finding fires when credentials "created exclusively for an EC2 instance through an Instance launch role are being used from an external IP address." In Mandiant's testing it fired after the data was copied, so it shortens an incident rather than preventing one.

Behavior of the role itself. Baseline what each instance role normally calls in the cloud audit log and alert on new API actions, above all listing and bulk reads, the signal in the Capital One complaint. Then make sure someone owns the alert: the OCC's order counted "effective dispositioning of alerts" among the missing controls.

When to bring in a penetration test

  • Before launching anything that fetches on a user's behalf: webhooks, integrations, importers, link previews, PDF or image generation, AI features that browse or call tools, and single sign-on configuration that takes a metadata URL.

  • After moving an application to the cloud, or changing how it gets credentials. A flaw that reached nothing in a data centre may reach a role in a cloud account.

  • After an SSRF fix. The MLflow and SonicWall cases both involved a control or a patch that already existed. A retest that repeats the redirect and DNS checks is the only evidence that the fix covers them.

Brief the provider with every feature that makes outbound requests, the network and cloud role around them, and access to egress logs during the test, and ask whether the report will say what the instance role could do with the credentials. Budget guidance is in our web application penetration testing scope and cost guide, and logic flaws that sit next to SSRF in workflow features are covered in our guide to business logic penetration testing.

One-time or continuous: where the Hybrid Pentest fits

Fetch features arrive with releases: a new integration, a new export format, a new webhook. A test once a year covers the features that existed that week. The evidence in this guide argues for testing closer to the release cycle. CISA added 11 entries mapped to CWE-918 to its exploited catalog in 2026, against 13 in the years 2021 to 2025. The MLflow flaw was on that list two days after its advisory. And in both the MLflow and SonicWall cases a control or a patch was already in place and did not hold.

Stingrai's Hybrid Pentest is built for that pattern. Snipe, Stingrai's autonomous AI agent for web applications and associated APIs, tests the full application while Stingrai's certified penetration testers test the same application manually alongside it and validate Snipe's findings, so coverage is wider and deeper. It is not a split of vulnerability classes between the two: both test the whole application. For one web application and associated APIs, the Hybrid Pentest is US$6,800 per assessment as a one-time test, or US$1,275 per month as a continuous program on a 12-month plan, with monthly Snipe testing, human-verified, and a quarterly deep dive by Stingrai's penetration testers. The one-time test suits an annual audit cycle. The continuous program suits a product that ships fetch features, integrations and AI tooling throughout the year. Both plans are on the pricing page. To start one, or to price a larger scope, get a quote.

How Stingrai tests for SSRF

Stingrai is a CREST member, founded in Toronto in 2021, accredited for Penetration Testing and AI-Enabled Penetration Testing and holding the CREST AI Charter company certification (CREST Marketplace), offering fully human-led and hybrid (human penetration testers plus AI agents) penetration tests, delivered by certified penetration testers who are also world-class security researchers and bug bounty hunters. The team has 18 published CVEs. Its web application and API penetration tests are authenticated across every user role and cover SSRF alongside IDOR, cross-site scripting and business logic, aligned to the OWASP Top 10 and ASVS. Because SSRF findings rarely end at the application, Stingrai's cloud penetration tests follow them into instance metadata abuse, cross-account role assumption and resource policies, so that a forged request is reported with a measured blast radius.

Each human-led engagement is staffed by two named penetration testers from a team holding OSCE³, OSWE, OSEP and CREST CRT certifications. Findings are posted to the PTaaS portal as they are confirmed, retesting of remediated findings is included, and every human-led and hybrid report ships with an attestation letter. Engagements run as one-time (annual) tests or as continuous programs. Larger scopes, including cloud environments and multi-application estates, are quoted per engagement.

Frequently Asked Questions

What is server-side request forgery (SSRF)?

Server-side request forgery (SSRF) is a vulnerability in which an attacker makes a server send a request to a destination the attacker chooses. Because the request comes from the server, it can reach internal services, administrative interfaces and cloud metadata services that the attacker cannot reach directly. MITRE tracks it as CWE-918.

What is an example of an SSRF attack?

A web application lets users set a profile picture by URL, and an attacker supplies an internal address instead. The best-documented real case is Capital One in 2019: a firewall misconfiguration let commands obtain credentials for a cloud role, which was used to copy data from storage buckets. Amazon Web Services wrote that it believed an SSRF attack was used.

What is the difference between SSRF and CSRF?

In server-side request forgery the attacker makes the server send a request, which carries the server's network access and targets internal systems. In cross-site request forgery (CSRF, CWE-352) the attacker makes a signed-in user's browser send a request, which carries that user's session. SSRF is fixed by controlling where the server may connect; CSRF with anti-forgery tokens and SameSite cookies. Both are mapped to A01 Broken Access Control in the OWASP Top 10:2025.

What is blind SSRF?

Blind SSRF is server-side request forgery in which the server makes the forged request but does not return the response to the attacker. It is detected with out-of-band techniques: the input is pointed at a listener the tester controls, and a request arriving there proves the server fetched it. Blind SSRF can still change state on internal services and reveal which hosts and ports exist through timing and errors.

Is SSRF in the OWASP Top 10?

Yes, inside a broader category. SSRF was its own entry, A10, in the OWASP Top 10:2021, added from the community survey. In the OWASP Top 10:2025 it has been rolled into A01:2025 Broken Access Control, which lists CWE-918 among its notable weaknesses. In the OWASP API Security Top 10 2023 it remains a separate entry, API7:2023 Server Side Request Forgery.

Does IMDSv2 prevent SSRF?

IMDSv2 reduces the impact of SSRF on AWS; it does not remove the vulnerability. Its session token is obtained with a PUT request that a basic SSRF flaw cannot make, and AWS says the design protects against the vast majority of SSRF vulnerabilities, not all of them. It only helps where version 2 is required, and the forged request can still reach other internal services.

How do you prevent SSRF?

Use an allow-list of destinations where they are known. Where any destination must be accepted, validate the resolved address, connect to that address and turn off redirects. Run the component that fetches in an isolated segment with default-deny outbound rules, require the hardened metadata service and give instance roles the least privilege that works.

How is SSRF tested in a penetration test?

The tester lists every feature that makes the server fetch something and points each one at a listener the tester controls. From there the tester checks which internal destinations are reachable, whether redirects are followed, whether the hostname is resolved again before connecting, and whether the cloud metadata service and the instance role are within reach. Fixes are retested.

References

  1. MITRE. CWE-918: Server-Side Request Forgery (SSRF) and the 2025 CWE Top 25 Most Dangerous Software Weaknesses.

  2. OWASP. A10:2021 Server-Side Request Forgery (SSRF), OWASP Top 10:2021.

  3. OWASP. Introduction and A01:2025 Broken Access Control, OWASP Top 10:2025.

  4. OWASP. API7:2023 Server Side Request Forgery, OWASP API Security Top 10 2023.

  5. OWASP. Server-Side Request Forgery Prevention Cheat Sheet.

  6. OWASP. Web Security Testing Guide v4.2: WSTG-INPV-19, Testing for Server-Side Request Forgery.

  7. OWASP. Application Security Verification Standard 5.0: V1 Encoding and Sanitization, V13 Configuration and V15 Secure Coding and Architecture.

  8. CISA. Known Exploited Vulnerabilities Catalog, version 2026.11.18, and the Supplemental Direction V1 to Emergency Directive 24-01, 31 January 2024.

  9. MITRE ATT&CK. T1552.005, Unsecured Credentials: Cloud Instance Metadata API.

  10. Amazon Web Services. Use the Instance Metadata Service to access instance metadata, Transition to using Instance Metadata Service Version 2, Configure instance metadata options for new instances and Add defense in depth against open firewalls, reverse proxies, and SSRF vulnerabilities with enhancements to the EC2 Instance Metadata Service, 19 November 2019.

  11. Amazon Web Services. Flow log limitations and GuardDuty IAM finding types.

  12. Microsoft. Azure Instance Metadata Service and Use managed identities on a virtual machine to acquire access token.

  13. Google Cloud. View and query VM metadata.

  14. Datadog. State of Cloud Security, October 2025. Data collected in September 2025.

  15. US Department of Justice. Criminal complaint, United States v. Paige A. Thompson, Western District of Washington, 29 July 2019.

  16. Office of the Comptroller of the Currency. OCC Assesses $80 Million Civil Money Penalty Against Capital One, 6 August 2020, and Consent Order AA-EC-20-51.

  17. Capital One. 2019 Capital One Cyber Incident: What Happened.

  18. Amazon Web Services. Letter from Stephen Schmidt to Senator Ron Wyden, 13 August 2019 (archived copy).

  19. Mandiant. Old Services, New Tricks: Cloud Metadata Abuse by UNC2903, 4 May 2022, and the Adminer advisory GHSA-x5r2-hj5c-8jx6 (CVE-2021-21311).

  20. Microsoft. HAFNIUM targeting Exchange Servers with 0-day exploits, 2 March 2021, and Analyzing attacks using the Exchange vulnerabilities CVE-2022-41040 and CVE-2022-41082, 30 September 2022.

  21. GitLab. CVE records CVE-2021-22175 and CVE-2021-39935, and Filtering outbound requests.

  22. CVE Program. CVE record CVE-2024-21893, published 31 January 2024.

  23. Cisco. Cisco Unified Communications Manager Server-Side Request Forgery Vulnerability (CVE-2026-20230), 3 June 2026, updated 1 July 2026.

  24. SonicWall. Advisories SNWLID-2026-0008, 14 July 2026, and SNWLID-2026-0016, 1 September 2026.

  25. Oracle. Oracle Security Alert Advisory, CVE-2025-61884, 11 October 2025.

  26. MLflow. GHSA-7gwp-5pfp-969j: Unauthenticated full-read SSRF in webhook delivery (CVE-2026-64849), 17 August 2026.

  27. Stingrai. State of Penetration Testing 2026 and Web Application Security Statistics 2026.

Talk to Stingrai

Stingrai's penetration testers check every feature that fetches on your users' behalf, the network around it and the cloud role behind it, and retest your fixes. Get a Quote or book a free discovery call.

0 views

0

X

Related reading

API Security Assessment (2026): Scope, Deliverables, Cost and How to Choose a Provider
Web App Security

API Security Assessment (2026): Scope, Deliverables, Cost and How to Choose a Provider

What an API security assessment covers, how it differs from a pentest and scanning, what to provide, deliverables, cost drivers and a provider checklist.

21 min read

Java4Shell (CVE-2026-114938): What Is Confirmed, Who Is Exposed and How to Fix It
AdvisoriesWeb App Security

Java4Shell (CVE-2026-114938): What Is Confirmed, Who Is Exposed and How to Fix It

Java4Shell is real: CVE-2026-114938, patched by Oracle on 17 November 2026. What is confirmed, which Java 17 to 27 builds are exposed and how to fix it.

19 min read

Penetration Testing as a Service (PTaaS): Models, Costs and How to Choose (2026)
Web App SecurityNetwork Security

Penetration Testing as a Service (PTaaS): Models, Costs and How to Choose (2026)

What penetration testing as a service (PTaaS) is, how it differs from annual tests, bug bounty and DAST, what it costs, and an RFP checklist for buyers.

24 min read

Contents

X