Webhook SSRF is server-side request forgery through a webhook feature. A user registers a callback URL, and your delivery worker sends requests to wherever that URL points, including internal services and the cloud metadata endpoint. Blocking a few addresses does not stop it. The destination has to be checked on the resolved IP at the moment of connection, redirects have to be refused or re-checked, and delivery workers belong in a network segment that cannot reach anything internal. CodeAnt AI tests this from the attacker's side in black box and grey box pentests, which fits SaaS, fintech and integration-heavy teams that let customers register URLs.
CodeAnt AI has run 12,000 pentests and is trusted by more than 1,000 companies, including Fortune 500 companies like NRG, cybersecurity leaders like Commvault, and fast-growing companies like 11x and Sanas.
The OWASP API Security Top 10 names webhooks as one of the features that make SSRF more common, and MITRE classifies the weakness as CWE-918. A code scanner can tell you that user input reaches an outbound request; only a test that sends the request can tell you where it lands.
What is Webhook SSRF?
Server-side request forgery happens when a server fetches a URL that a user controls without ensuring the request goes only where it should (MITRE CWE-918). A webhook feature is that pattern by design: the customer supplies a URL, and your platform sends requests to it every time an event fires. If the delivery worker can reach your internal network, so can anyone who can create a webhook. OWASP's Webhook Security Cheat Sheet puts it plainly: the delivery workers become a proxy into your network. One of the two example attacks in OWASP API7:2023 is a webhook feature: the API sends a test request to a user-supplied webhook URL and shows the response, and the attacker points it at a cloud metadata service to read credentials.
The same class appears in OWASP's lists under different labels. It was A10 in the OWASP Top 10 2021, it sits under A01 Broken Access Control in the OWASP Top 10 2025, and it is API7 in the OWASP API Security Top 10 2023.
Can Someone Use Our Webhook Feature to Reach Internal Services?
Yes, if any one of the controls below is missing or applied on only one code path. Webhook features usually send requests from more places than teams expect:
the first delivery after an event
retries after a failed delivery
a "send test event" or "ping" button in the dashboard
a manual redeliver or replay action
endpoint verification when the URL is first saved
the same features exposed through your public API, not only the UI
Each path needs the same destination checks. A common gap is a validator that runs when the URL is saved in the dashboard but not when it is updated through the API, or a retry worker that uses a different HTTP client from the first delivery.
Gating webhook creation behind verified business accounts reduces who can try. It does not remove the risk: a leaked integrator or API credential gets an attacker past the gate, so the delivery side still needs its own controls.
Does Blocking 127.0.0.1 Stop Webhook SSRF?
No. A blocklist of a few addresses misses most of the ways a request reaches an internal service:
The same internal address can be written in alternative IPv4 encodings, IPv6 forms and IPv4-mapped IPv6 forms that a naive string check does not recognize. The OWASP SSRF Prevention Cheat Sheet says to normalize addresses before comparing them.
A public hostname can resolve to a private address, and DNS rebinding lets a name return a public address when you validate it and a private one when the HTTP client connects. OWASP's guidance is to resolve once, validate the IP and connect to that exact IP.
A validated public URL can answer with a redirect that points inward. Turn redirect following off in the delivery client, or apply the same checks to every hop.
Internal hostnames, link-local ranges and cloud metadata hostnames need blocking too, not only loopback.
OWASP calls blocklists bypass-prone and prefers allowlists, but webhooks are the case where an allowlist is impossible because customers choose the destination. That is why the network layer matters as much as the code.
Does SSRF Matter if the Response Never Comes Back to the User?
Yes. OWASP calls this blind SSRF: the attacker gets no response body, so it takes more effort to detect, but the request still reaches the internal service. A blind request can still change state on an internal endpoint that accepts it, and differences in error messages or response times can reveal which internal hosts and ports exist. OWASP's API7 example scenario describes exactly this kind of internal port scanning through timing.
Returning the delivery response in the dashboard, which many "test webhook" features do, turns a blind SSRF into one where the attacker reads internal responses directly.
Which Controls Stop Webhook SSRF, and How Does a Pentest Check Each One?
These eight controls come from the OWASP SSRF Prevention Cheat Sheet, the OWASP Webhook Security Cheat Sheet and AWS's EC2 documentation. The third column is what a tester does to confirm the control holds.
Control | What it stops | How a pentest checks it | Common gap |
|---|---|---|---|
HTTPS-only scheme allowlist | Requests over other schemes and plain HTTP to internal services | Registers URLs with other schemes and checks they are rejected at save time and at delivery | Checked in the UI form but not on the API or on edit |
Resolve once, validate the IP, connect to that IP | DNS rebinding and public names that resolve to private addresses | Registers a public name that points to a private address, and one whose answer changes after validation | The validator resolves the name, then the HTTP client resolves it again |
Block every non-public address after normalizing it | Loopback, private, link-local and cloud metadata ranges, in IPv4, IPv6 and mapped forms | Tries alternative encodings and IPv6 forms of blocked addresses | IPv4-only blocklist; mapped IPv6 forms not normalized |
No redirect following, or the same checks on every hop | A validated public URL that redirects inward | Answers a delivery from a tester-controlled server with a redirect to an internal address | The HTTP client follows redirects by default |
Same checks on retries, test sends and redeliveries | A target that changes after the first delivery | Changes where the name points between the first delivery and the retry, and uses every send path | Retry or test-send code uses a different client |
Egress proxy and isolated delivery workers | Anything the application-layer check misses | Checks whether a delivery that passes validation can still reach internal ranges from the worker's network | Workers share a subnet with internal APIs, or one send path skips the proxy |
No delivery response bodies or detailed errors returned | Reading internal responses; mapping hosts and ports through errors and timing | Compares responses and timing for reachable and unreachable internal targets | The test-webhook button shows the full response |
IMDSv2 required on AWS instances | Requests to the instance metadata service that carry no session token | Checks whether the metadata service is reachable from the worker and whether token-less requests are answered | IMDSv1 still allowed on older instances or launch templates |
On the last row: AWS's IMDSv2 requires a session token that is obtained with a PUT request, blocks token requests that carry an X-Forwarded-For header, and lets you set the instance to IMDSv2 only. AWS describes it as defense in depth, and the OWASP SSRF Prevention Cheat Sheet says it protects against some SSRF cases, not all of them.
How Do You Test Webhook SSRF Without Touching Production Data?
Webhook SSRF can be tested without reading or changing customer records. The usual approach:
Test staging first if it runs the same delivery workers, network rules and egress proxy as production. If staging differs, the result does not transfer.
Use dedicated test accounts and test webhooks, never a customer's.
Point deliveries at a server the tester controls. Out-of-band callbacks show whether a request left the worker, which is how blind SSRF is confirmed.
Stop at proof of reachability. Showing that the worker reached an internal address or the metadata service is enough to prove the finding; there is no need to pull data from it.
Agree a stop rule in advance for anything that could change state on an internal endpoint.
Our guide to running an AI pentest safely against production covers rules of engagement in more detail.
What Does a Confirmed Webhook SSRF Finding Look Like in a Pentest Report?
A theoretical finding says user input reaches an outbound request. A confirmed finding shows the request landed somewhere it should not. The OWASP Web Security Testing Guide sets the same bar: identify the injection points, test whether they are exploitable, then assess severity.
A confirmed webhook SSRF finding should include:
the feature and send path (first delivery, retry, test send, API)
the destination that was registered and what it resolved to at connect time
evidence the request arrived: the tester's callback log, or the internal response the dashboard displayed
what was reachable from the worker, such as the metadata service, an internal API or open internal ports
which control failed, from the table above
who can trigger it: anyone who can sign up, verified accounts only, or admins only
steps engineers can rerun, and the retest result after the fix
Severity follows from the last three points. An SSRF that any new account can trigger and that reaches cloud credentials is critical. One that only reaches a port that answers nothing, and only for an admin, is far lower.
Which Testing Approach Catches Webhook SSRF?
Approach | What it is | How it finds webhook SSRF | Proves impact | Pricing model | Best for | Main tradeoff |
|---|---|---|---|---|---|---|
AI pentest service: black, grey and white box | Tests URL-accepting features such as webhooks from outside, or with test accounts in grey box | Yes; critical findings are checked by a security researcher before delivery | Priced per pentest on the attack surface you have | Teams that need the finding proven and a report for SOC 2 or ISO 27001 | A scheduled engagement, not a check on every pull request | |
Manual testing tool your tester runs | Tester inserts a Burp Collaborator domain and watches for interactions; Collaborator is a Pro-only feature | Depends on the tester | Per-user subscription; Community Edition is free | In-house AppSec teams and consultants | Needs a skilled tester; no report is delivered | |
ZAP | Free, open-source web scanner and proxy | OAST Support add-on (BOAST, Interactsh, Callbacks) detects out-of-band requests | Depends on who runs it | Free and open source | Teams scripting checks into CI | Needs scripting to log in, register a webhook and trigger deliveries |
Static code scanning | Taint rules flag user input flowing into the host of an outbound URL (CWE-918) | No; it reads code, not runtime behavior | Free up to 10 contributors; Teams from $30 per month per contributor; Enterprise custom | Catching SSRF-prone code before merge | Cannot see egress proxies, network segments or resolver behavior, so it cannot say whether a request lands | |
In-house regression tests | Tests your team writes from the OWASP Webhook Security Cheat Sheet list | Registers an HTTP URL, the metadata endpoint, loopback, an internal hostname and a public name that resolves to a private address; each must be rejected | Only for the cases written | Engineering time | Making sure a fix stays fixed | Covers only the cases you thought of; encoding bypasses need the OWASP testing guide's SSRF cases |
How CodeAnt AI Tests Webhook Features
CodeAnt AI runs AI pentests in black box, grey box and white box modes across web apps, APIs, cloud, Kubernetes, Active Directory and internal and external networks. Webhook SSRF is mostly a grey box problem, because creating a webhook usually needs an account: with test credentials, the pentest can register callback URLs, trigger every send path and check what the delivery worker can reach. White box adds the HTTP client's redirect handling and the workers' network segment. Critical findings are checked by a security researcher before they reach you, the report lands within 48 hours with findings mapped to SOC 2 and ISO 27001, and a re-scan after your fix is free.
CodeAnt AI has run 12,000 pentests and is trusted by more than 1,000 companies, including Fortune 500 companies like NRG, cybersecurity leaders like Commvault, and fast-growing companies like 11x and Sanas. CodeAnt prices each pentest on the attack surface you have, and gives very generous pricing to fast-growing companies.
Have your webhook and URL-fetch features tested in a black box or grey box pentest: codeant.ai/pentesting
Common Pushback from Engineering Teams
"Our code scanner already flags SSRF." A code scanner sees that user input reaches an outbound request. It cannot see whether the egress proxy, the network segment or the resolver blocks that request at runtime, so many SSRF alerts are not exploitable, and some real ones sit behind a send path the scanner did not trace. Send the request and see where it lands.
"Only verified business accounts can create webhooks." That narrows who can try, which is worth doing. It does not protect you once an integrator's credentials or an API key leaks. Treat the delivery worker as reachable by an attacker either way.
Related reading
IDOR vulnerabilities: how they work and how to test for them
Vulnerability chaining: how individual weaknesses become a breach







