Skip to content

Server-side request forgery (SSRF)

SSRF makes an application send unwanted network requests from its server. What matters is which destinations the server actually reaches.

Also known asSSRF
IT security

Server-side request forgery, or SSRF, means abusing an application to make its server send requests to unintended destinations. The server may have different network access from the person providing input. This can, for example, allow access to internal services that are not directly reachable from outside.

A document preview with an externally supplied destination

A fictional project portal fetches a document for preview from the address in the previewTarget field. If that address is used without appropriate checks, the preview feature can become an intermediary for unwanted access. The problem here lies in the server's fetch, before the document is displayed. Such requests can have unwanted effects even when the response content is not returned.

In this portal variant, previews are intended only for known document sources. The application can therefore fix the permitted sources instead of accepting arbitrary destinations. This restriction fits only if the feature can actually be limited to known sources.

Consider destination checks and network boundaries together

MDN and OWASP describe protection at application and network levels. Checking only the written hostname is insufficient: resolved destination addresses and the actual connection must also satisfy the permitted destination policy. Redirects can change the destination and must not bypass the checks.

The service also needs only the network access required for its task. Protocol and destination restrictions, controlled redirects and limited network privileges work together. HTTPS alone does not make a destination permitted. The portal scenario explains the trust boundary; it is not a report of a fetch or security test being performed.

Sources