SSRF into the metadata service
The image preview checks the URL prefix, not the parsed host.
The image preview feature only allows URLs starting with the official image domain. The server then fetches that URL. An internal metadata service on the network stores the flag.
ObjectiveMake the server fetch <code>/latest/meta-data/flag</code> from <code>169.254.169.254</code> or an internal host.
Useful tools
BrowsercurlBurp Suite CommunityURL parser
Hints
Hint 1
Open the target and try a normal URL first. The filter only checks
url.startsWith("http://images.nordvik.example"). Try an internal URL such as http://169.254.169.254/latest/meta-data/flag to see the rejection.Hint 2
The filter uses the raw string, while the URL parser reads the host after the
@ sign. Insert fake credentials: http://images.nordvik.example@169.254.169.254/latest/meta-data/flag.Hint 3
Send that URL. The server sees the allowed prefix but fetches the metadata host. The response contains the flag. Alternative:
http://images.nordvik.example@internal.nordvik.local/latest/meta-data/flag.