Check ID:
Provider: AWS
Service:
Severity: HIGH
Categories:
Resource type:
autoscaling_group_launch_configuration_requires_imdsv2Provider: AWS
Service:
autoscalingSeverity: HIGH
Categories:
secretsResource type:
AwsAutoScalingAutoScalingGroupWhat this check verifies
Amazon EC2 Auto Scaling launch configurations are evaluated for Instance Metadata Service settings. Instances should have the metadata endpointenabled with http_tokens=required (enforcing IMDSv2), or have the metadata service disabled.
Allowing http_tokens=optional or omitting the version leaves legacy access enabled.
Risk
Without enforced IMDSv2, SSRF and local escape paths can access IAM role credentials, enabling unauthorized API calls. Attackers could:- Exfiltrate data with stolen tokens
- Move laterally and modify resources, degrading confidentiality and integrity
Recommendation
Require IMDSv2 for Auto Scaling-launched instances by settinghttp_tokens=required when metadata is enabled. If metadata is not needed, disable it.
Apply least privilege to instance roles, set IMDSv2 as an account default, and use defense in depth (egress filtering, SSRF protections) to limit exposure.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/EC2/require-imds-v2.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/autoscaling-controls.html#autoscaling-3
- https://aws.plainenglish.io/dont-let-metadata-leak-why-imdsv2-is-a-must-and-how-to-migrate-a88e1e285394
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = autoscaling_group_launch_configuration_requires_imdsv2. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks