…then an attacker who finds it can and attempt to run it against any target server they control — or worse, if they have network access to your cloud environment, they can run it against your instance metadata service.
The primary motivation for IMDSv2 was the mitigation of Server-Side Request Forgery (SSRF).
When you see the string curl-url-http-3A-2F-2F169.254.169.254-2Flatest-2Fapi-2Ftoken (which is a URL-encoded version of the path), it refers to this specific two-step process. Step 1: Generate the Token