Server-Side Request Forgery (SSRF)
Description
Detects user input flowing to HTTP client requests, enabling Server-Side Request Forgery attacks.
What Shoulder detects
How to fix
Validate URLs against an allowlist of permitted domains.
```go
allowed := map[string]bool{"api.example.com": true}
parsed, _ := url.Parse(targetURL)
if !allowed[parsed.Host] {
return errors.New("domain not allowed")
}
```
Learn more: https://shoulder.dev/learn/go/cwe-918/ssrf
Applies to
Languages
Frameworks
stdlib
gin
echo
fiber
chi
gorilla
References
Scan for this issue
Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=go-ssrf .
Real-world examples
Known CVEs in the Server-Side Request Forgery vulnerability class that this rule helps detect.