CWE-918Data exposureSeverity · High

The server fetching internal addresses

A user-supplied URL makes the server call internal services or cloud metadata. Attackers can then read private systems and steal cloud credentials.

At a glance

Controls
CWE-918 · A10:2021 Server-Side Request Forgery
Typical severityHigh
ReferenceCWE-918
OWASP Top 10A10:2021 Server-Side Request Forgery

What it is

Many features fetch a URL the user provides, such as a webhook, an image link or a file import. If the server does not limit where it may connect, it can be pointed at addresses only it can reach. These include internal admin services, databases and the cloud metadata endpoint.

Attackers use this to read internal pages, scan the private network and pull temporary cloud keys from the metadata service. Redirects, alternate IP formats and DNS tricks can slip past simple blocklists. AI-assisted attackers can try many bypass variants quickly against every URL field they find.

Where it hides

What a reviewer can look for in the code and in the behaviour, before anyone proves it.

  • Webhook and callback URL settings
  • Import from URL, link preview and image fetch features
  • PDF and screenshot generators that load a page
  • Integration set-up screens that test a connection

How MATT tests it

The proof runs against the deployed product, on every release, whoever wrote the code.

  1. 01Read the code to find every place the server fetches a URL that a user controls.
  2. 02Sign in as a test user and point each field at a tester-owned listener to confirm the server calls out.
  3. 03Submit internal and metadata addresses and harmless bypass forms, and record whether the server connects.
The rule, in plain English

The server must fetch only addresses on an allowed list, never internal ones.

Executable check

as user A: POST /v1/webhooks with url "http://169.254.169.254/" expect: 400 and no outbound request as user A: POST /v1/webhooks with url to an allowed host that redirects to 127.0.0.1 expect: the redirect is refused

Every rule MATT holds →

What the fix looks like

  1. 01

    Allow outbound fetches only to approved hosts and schemes.

  2. 02

    Resolve the hostname and reject private, loopback and link‑local addresses before connecting.

  3. 03

    Re‑check every redirect against the same rules, or turn redirects off.

  4. 04

    Require session tokens for the cloud metadata service and run fetchers on an isolated network.

A check that was never written is found by proving the deployed behaviour, fixed with the engineer who shipped it, and kept fixed by running the control on every change. What is ExploitOps? →

ExploitOps discovery call

Understand where your security loop breaks.

A call with a MATT co-founder to understand your product and whether an ExploitOps Review is worth doing. If there is a real need, we scope one with the research team.

Let’s understand your priority

What brings you to MATT?

What would you like help with?
01 / 02