Homeglossary

Server-Side Request Forgery

Server-side request forgery is a web security vulnerability that causes an application server to make a network request chosen or influenced by an attacker. Because the request comes from a trusted server, it may reach internal services or cloud resources that a user's browser cannot access. It commonly arises when an app fetches a user-supplied URL without strict destination controls.

Build safer connected apps with Emergent.

What Is Server-Side Request Forgery?

Server-side request forgery, or SSRF, is a vulnerability that lets an attacker make an application server send a network request. Because it comes from the server, the request may reach internal systems or cloud resources a visitor's browser cannot access. MDN's SSRF guidance explains the risk of trusting server-originated requests.

How an SSRF Vulnerability Works

SSRF often appears in features that retrieve information from another location when the destination is not tightly controlled.

  1. A user supplies a URL or remote resource reference, such as for a preview or image import.
  2. The application creates an outbound API request to retrieve it.
  3. Weak validation permits an internal or redirected destination.
  4. The server sends the request using its own network access.
  5. The application may expose the response or perform an unintended action.

SSRF vs. CSRF: What Is the Difference?

SSRF and CSRF involve unwanted requests but target different systems. CSRF and XSRF are names for the same browser-based attack category.

AspectSSRFCSRF or XSRF
Request originApplication serverVictim's browser
Primary targetInternal services or trusted network resourcesA site where the victim is signed in
Common entry pointUser-controlled URL or integration settingA malicious page or link
Main defensesDestination controls and network egress rulesAnti-CSRF tokens and cookie protections

Why SSRF Can Be Dangerous

A vulnerable server can become a gateway into protected parts of an environment.

  • It can expose internal administration tools or APIs.
  • It may reach cloud metadata services that provide temporary credentials.
  • It can trigger actions through services that trust the server.
  • It may reveal network details or sensitive data.

Common SSRF Entry Points in Web Applications

Review any feature that makes an outbound connection, not only fields labelled “URL.”

  • Link previews, feed readers, and webhook test tools.
  • Document, image, or remote-file imports.
  • PDF, screenshot, and media generation services.
  • Third-party integrations and server-side API proxies.

How to Prevent Server-Side Request Forgery

Use layers of control rather than one input check.

  • Prefer an allowlist of approved hosts and protocols.
  • Parse URLs safely and recheck the final address after redirects.
  • Block local and private ranges, and restrict outbound traffic with egress firewall rules.
  • Use least-privilege identities and protect cloud metadata endpoints.
  • Log outbound requests and review them through server monitoring dashboards.

Practical Limits of SSRF Defenses

Simple blocklists are not enough because destinations can change after an initial check.

  • Hostname blocklists can miss alternate names and IP formats.
  • DNS records can change between validation and connection.
  • Redirects can send a safe-looking request elsewhere.
  • Shared cloud infrastructure can complicate address-based rules.
  • Test controls in development and production networks.

Building Integrations Safely with Emergent

Apps built with Emergent can connect APIs, webhooks, remote files, and third-party services. When using an AI web app builder, specify approved services, authentication boundaries, redirect rules, and outbound-request restrictions during implementation. This makes SSRF-aware design part of the integration plan.

Start Building
on Emergent today
Start Building