A Confused Deputy Vulnerability in AWS AppSync
AWS AppSync failed to properly validate the account of a role ARN when creating a data source, allowing an attacker to bypass cross-account restrictions by using mixed-case JSON keys. This let an attacker assume IAM roles in other AWS accounts that trust AppSync, potentially accessing resources such as DynamoDB tables.
Published on securitylabs.datadoghq.com
Staff Security Researcher](https://securitylabs.datadoghq.com/articles/?author=NickFrichette)
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the API validated the role ARN's account using a case-sensitive check on the JSON key 'serviceRoleArn', so a mixed-case key like 'servicerolearn' bypassed the validation.
Impact
An attacker could assume IAM roles in other AWS accounts that trust AppSync, potentially accessing or modifying resources such as DynamoDB tables, though detection is possible via CloudTrail anomalies.
What the attacker needed
Knowledge of a role ARN in the victim account; the role must trust appsync.amazonaws.com; attacker has an AWS account
The fix
AWS fixed the vulnerability by correcting the ARN validation to be case-insensitive.
How it was found
- Create an AppSync data source with a serviceRoleArn pointing to a role in another AWS account.
- Observe that the API rejects the request with a cross-account error.
- Resend the request using a mixed-case key such as servicerolearn instead of serviceRoleArn.
- Observe that the data source is created successfully, bypassing the cross-account check.
- Use the data source to assume the role in the victim account and interact with its resources.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
AWS AppSync is a service for building GraphQL APIs. It can be given permission to act on your behalf using IAM roles. The bug let an attacker trick AppSync into using a role from a different AWS account, so they could read or modify data in that account.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.