Application security

SSRF prevention for cloud-connected applications

SSRF risk appears when untrusted input influences a server’s outbound request. Review the intended destinations, how URLs are parsed and resolved, redirect behavior, and what the fetching service can reach. Application validation and network controls should support the same destination policy.

What matters first

  • Define allowed fetch behavior before choosing validation rules.
  • Review redirects and actual network destinations, not only the original URL string.
  • Limit the fetching service’s network access and credential authority.

Inventory features that make outbound requests

Look for URL previews, webhook configuration, import tools, document conversion, image processing, integration testing, and AI tools that retrieve web content. A feature can make network requests indirectly through a library or worker, so include the full processing path.

Describe what each feature needs to reach. A fixed provider integration and an open web-fetch feature require different policies. Decide allowed schemes, destinations, ports, redirects, and authentication behavior as product requirements rather than leaving them to a generic URL parser.

References: [1] OWASP, [2] OWASP

Validate the destination the service will contact

Use an appropriate parsing and validation approach for the selected policy. Review how redirects, DNS resolution, alternate address forms, and library behavior affect the destination. A string that passes an initial check may not describe every subsequent connection in a request chain.

Prefer narrow destination choices for fixed integrations. For more general fetching, design controls that account for the infrastructure the service can reach and enforce them at the relevant boundaries. Keep the handling of private services, provider metadata, and special address ranges aligned with the intended use.

References: [1] OWASP, [3] OWASP

Constrain network and identity authority

Limit outbound access for the fetching workload to what the feature requires, where the environment supports it. Review proxy configuration, service credentials, and cloud permissions. A network request feature should not inherit unrelated administrative access simply because it runs in a convenient application process.

Network boundaries complement application checks; they do not eliminate the need to validate request intent. Review downstream service behavior too. An internal endpoint may be safe only because it assumes its caller is trusted, which can increase the consequences of an unintended server-side request.

References: [4] AWS, [5] AWS, [1] OWASP

Test the complete fetch workflow safely

Use destinations and infrastructure you control during an authorized review. Verify expected allowed requests, rejected destinations, redirect policy, timeouts, and response-size handling. Avoid probing unrelated internal systems as a shortcut to demonstrating a concern.

Record which component makes the connection, under which identity, and what evidence supports the result. Retest after changes to network policy, URL libraries, proxy settings, or cloud hosting. The desired outcome is a consistent destination boundary from input validation to the actual outbound connection.

References: [6] NIST, [1] OWASP

Your next steps

  1. List features and workers that fetch URLs or contact configurable endpoints.
  2. Define permitted destinations and redirect behavior for each use case.
  3. Review egress and identity permissions for the fetching workload.
  4. Book a scoped review using controlled destinations and safe verification.

Questions teams ask

Is checking that a URL starts with HTTPS enough?

No. The scheme does not establish that the destination is permitted or that redirects and resolution preserve the intended boundary.

Can network rules replace URL validation?

They are complementary. Application policy establishes intended behavior, while network restrictions can reduce reachable destinations and consequences.

Sources and editorial notes

Public-source facts are cited above. The review questions and action plans are Cyphen’s guidance for applying those lessons to your own systems. Sources checked on .

  1. OWASP: Server-Side Request Forgery Prevention Cheat Sheet
  2. OWASP: Threat Modeling Cheat Sheet
  3. OWASP: REST Security Cheat Sheet
  4. AWS: Security Pillar: AWS Well-Architected Framework
  5. AWS: Security best practices in IAM
  6. NIST: Technical Guide to Information Security Testing and Assessment