Server-side request forgery meaning, in plain words

SSRF makes a server connect to internal devices for an attacker. It arises when a user-supplied URL is fetched unchecked. How it works, and the allow-list fix.

Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated

SSRF is a technique that makes a server connect to internal devices on an attacker's behalf. The name stands for Server-Side Request Forgery. OWASP explains that it arises when an application fetches the material at a user-supplied URL without checking it. Its mark is that, even where a firewall protects you, the request reaches the inside through the server.

How does SSRF work?

Think of a company receptionist who is asked to "fetch the documents at this address". Outsiders cannot enter the offices. But the receptionist works inside, and so, if asked, can go to rooms only insiders may enter.

On a website, the entrance is a feature in which the server fetches, on the user's behalf, whatever lies at a URL the user typed. MITRE's CWE-918 organizes it as a weakness where the server does not check the destination enough, so it can be made to connect to an unintended place. How to check is gathered on the SSRF vulnerability page.

The measures OWASP gives split into the application side and the network side. In the application, decide the schemes (kinds of communication), ports and destinations that may be fetched with an allow list. It also lists not returning the fetched response as it is to the user, and disabling HTTP redirects. On the network, use a "deny by default" rule that allows only the traffic you need.

Why does SSRF matter?

URL-handling features are common on sites: importing an image from a URL, link previews, and notification settings that send to outside services (webhooks). Any of them can be an entrance.

According to CWE-918, what is read is application data and information on internal hosts that cannot be reached directly from outside. It also notes that defenses such as a firewall can be crossed by using the server's own connection.

OWASP warns against relying on deny lists of forbidden destinations, or on regular expressions alone, because they can be evaded. The allow list that fixes permitted destinations is the basis.

The free URL check can show what your site exposes publicly, nothing more.

Related terms

  • XXE: a technique that abuses XML reading to make the server fetch another place's content.
  • Path traversal: a technique that reads files from folders that were not made public.
  • Open redirect: a similar weakness in which an outside value decides the destination.
  • Vulnerability: the security hole itself; SSRF is one kind.

Next step

List the features on your site that import from a URL or send notifications outward. How to check and fix them is on the SSRF vulnerability page. To have the settings inside reviewed, contact us.

Frequently asked questions

Does a firewall stop SSRF?

Not completely. SSRF makes the server on the inside do the connecting, so a wall facing outward may not stop it. Combine checking destinations against an allow list with a setting that denies internal traffic by default.

Is it enough to list dangerous destinations and refuse them?

Not enough. OWASP warns against relying on deny lists or regular expressions alone. The basic approach is an allow list that decides which destinations may be fetched.

Frequently asked questions

Does a firewall stop SSRF?

Not completely. SSRF makes the server on the inside do the connecting, so a wall facing outward may not stop it. Combine checking destinations against an allow list with a setting that denies internal traffic by default.

Is it enough to list dangerous destinations and refuse them?

Not enough. OWASP warns against relying on deny lists or regular expressions alone. The basic approach is an allow list that decides which destinations may be fetched.

See what an attacker can see, today

The free URL check returns a grade in under a minute. For costs and next steps, book a free consultation.