In-depth lesson · Blind SSRF
Typical fixes
Every point the Blind SSRF reports back under this heading, best-backed first, each with the reports it is seen in.
-
Parse the URL and compare the actual host against the allow-list rather than searching for a substring.
Seen in 2 reports
-
High -
Medium
-
-
Apply the existing localhost validation function to every import URL.
Seen in 2 reports
-
Do not build outbound URLs from the Host header; validate the host before any request.
Seen in 1 report
-
Use the SSRF-protected HTTP helper instead of the raw HTTP library.
Seen in 1 report
-
Set a redirect policy on the Docker client so it does not follow redirects from the daemon.
Seen in 1 report
-
Re-check the destination against the blocklist after every redirect.
Seen in 1 report
-
Re-check the resolved address after DNS resolution to defeat rebinding.
Seen in 1 report
-
Apply the same SSRF protection to the detect host keys function as to the main mirroring feature.
Seen in 1 report
-
Strip carriage return and line feed characters from webhook header names.
Seen in 1 report
-
Do not allow local requests in analytics fetches and trim error responses before logging.
-
Do not let an image library auto-detect user input as a URL or path; validate the content type.
Seen in 1 report
-
Validate and restrict the destination of user-supplied URLs before fetching.
Seen in 1 report