← all posts
APPLICATION SECURITY · SSRF

When a Webhook Becomes a Way In

How a flexible “transform your webhook data” feature turned into a path from the public internet to cloud credentials, and what it took to close it.

Ajay Magar · 6 min read
TL;DR
  • During a security review of a multi-tenant SaaS platform, I found that its custom webhook feature let users attach their own data-transformation rules.
  • Those rules ran on the platform’s servers, could make network calls, and the webhook URL needed no authentication.
  • Chained together, that let anyone on the internet reach internal systems and pull out cloud and database credentials. The fix was several small layers of defense, not one big patch.

The feature: a helpful little transformer

Many SaaS products let you connect outside tools through webhooks: the platform gives you a unique URL, and any time something happens in another app, that app sends data to the URL.

This platform went one step further. Because every tool formats its data differently, it let you write a small transformation rule that reshapes incoming data before it is stored. It is a genuinely useful feature, and exactly the kind of flexibility customers ask for.

Partner appsends data Webhook URLreceives it Transformation rulewritten by the customer Stored eventin the platform
How the feature was meant to work.

Three small gaps

None of these looked alarming on its own. Each is the kind of decision a busy team makes for good reasons:

1. Open doorThe webhook URL accepted data from anyone. No signature or secret was needed to call it.
2. Too much visibilityThe transformation rule could see everything about the incoming request, including login tokens and stored secrets.
3. Network accessThe rule could make its own web requests, from inside the platform’s network.

That third point is the important one. A “transformation rule” that can make network requests isn’t really a config setting anymore. It is code that the customer runs on your servers. And code running inside your network can talk to things the public internet never should.

The attack, step by step

This class of bug is called server-side request forgery (SSRF): tricking a server into making requests on an attacker’s behalf. Here is how the pieces fit together:

INSIDE THE PLATFORM’S NETWORK Attackeranywhere online Webhook URLno login needed Attacker’s ruleruns on the server Cloud metadata Internal config Secrets service Data connectors 1 2 3 4 responses come back inside the stored event
Four steps from “anyone on the internet” to “inside the network”.
  1. Set up the trap. The attacker creates a webhook with a transformation rule that, instead of reshaping data, makes requests to internal addresses.
  2. Trigger it. They send anything to the webhook URL. No login is needed, so this works from anywhere.
  3. Reach inside. The rule runs on the platform’s own server and calls internal systems the outside world can’t normally see.
  4. Read the answers. Whatever those systems return is saved into the event, where the attacker simply reads it back.

What was within reach

In a test environment, and with all sensitive values redacted from our evidence, I confirmed the chain could reach:

In plain terms: one unauthenticated web request could become a foothold inside the infrastructure. That is why it was rated critical.

How it was fixed: layers, not a single patch

The tempting fix is to block one internal address and move on. But SSRF has many bypasses (redirects, alternate address formats, new internal services), so the durable fix is several independent layers. Each one breaks part of the chain, and together they close it:

Attacker ✕ 1 · Signed webhooks: only callers with a secret can trigger it 2 · Sandboxed rules: rules can’t make network calls 3 · Need-to-know inputs: no tokens or secrets passed to rules 4 · Outbound firewall: no access to metadata or admin pages 5 · Locked-down internals: internal services require auth too
Defense in depth: several small controls instead of one clever patch.

Lessons for anyone building integrations

This finding came from an authorized security review and was reported and fixed before publication. Product names, internal systems and technical specifics have been generalized, and no real secrets are shown.