
Server-Side Request Forgery (SSRF) is a type of vulnerability where an attacker can trick a server into making arbitrary requests to internal or external systems, potentially exposing internal services and sensitive data. SSRF allows an attacker to interact with services that the server has access to, which could include querying metadata endpoints (such as cloud metadata services), accessing internal networks, or even gaining access to restricted resources.
Types of SSRF :
- Basic SSRF: The attacker can see the response from the internal server directly (e.g., accessing internal services or files).
- Blind SSRF: The attacker does not see the response but can infer the results through other indirect channels (e.g., DNS lookups).
- Second-Order SSRF: The attacker inputs a malicious URL which is stored,
Key Concepts:
- Arbitrary Outbound Requests: The attacker makes requests through the vulnerable server, bypassing firewalls or network protections.
- Internal System Access: Attackers can potentially interact with systems not exposed to the public internet.
- Metadata Endpoints: For instance, in cloud environments, querying metadata services (like AWS EC2) can lead to sensitive information leakage, such as API keys or credentials.
Notable Example in Security:
SSRF was highlighted in the OWASP Top 10 for 2021 as a critical vulnerability under A10:2021 - Server-Side Request Forgery. This inclusion shows its rising prominence as a threat vector.
Impact of SSRF:
- Remote Code Execution (RCE): SSRF could be escalated to RCE if the internal systems that the server accesses are vulnerable.
- Sensitive Information Disclosure: Attacker can access cloud infrastructure metadata (credentials, keys, tokens).
- Internal Network Access: May allow probing or further exploitation of internal services.