AWS IMDSv2 Architecture Explained: How Session Tokens Help Block SSRF Attacks
The Amazon EC2 Instance Metadata Service gives running instances details about their environment, including temporary IAM credentials, which makes it a sensitive internal target. Server-Side Request Forgery flaws can let attackers reach this endpoint from inside an application. AWS introduced IMDSv2 to make such attacks harder by requiring a session token obtained through a PUT request before metadata can be read. The token has a configurable lifetime of one second to six hours and is sent in a header with subsequent requests. The article also covers enforcing IMDSv2 at scale using AWS CLI, Terraform, and Service Control Policies.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in