AG-SSRF: Server-Side Request Forgery

HIGH AG-SSRF OWASP ASI02

What this rule means

A function passes a tool-controlled value into a network fetch where the parameter controls the URL's scheme or host — not just a path or query string — with no allowlist or validation of the destination.

Why it matters

The canonical SSRF target in cloud environments is the instance metadata endpoint (`169.254.169.254`), which hands over IAM credentials to anything that can reach it — the reason this class of bug is treated as credential theft, not just an info leak.

How to fix it

Validate the destination against an explicit allowlist of hosts/schemes before fetching; block link-local and internal address ranges by default.

Detect it

pip install lucin
lucin scan .                  # all rules
lucin explain AG-SSRF          # this rule, in your terminal

Findings carry a file:line and, where the rule supports it, a witness path showing the flow that triggered it. Precision and recall for the whole rule set, with the commands that regenerate them, are on the benchmarks page — and the gaps are on limits.

← All detection rules