Skip to content
Access control Write-up Intermediate

The Fault in Our Stars: Security Implications of AWS API Gateway Lambda Authorizers and IAM Wildcard Expansion

AWS documentation and sample code for API Gateway lambda authorizers used IAM policy wildcards in ways that implied they matched only a single path segment, but the stars actually expand across slashes. An authenticated attacker could therefore reach API endpoints the developer did not intend to allow, especially where the authorizer policy was the only authorization check.

tenchisecurity.com

Published on tenchisecurity.com

If you read this article and find out that an API you develop or use was vulnerable because of the incorrect use of stars we described in this blog post, we would love to hear from you. Please click here and answer this quick anonymous poll so we can find out how prevalent this issue is.

The author, on tenchisecurity.com

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 documentation and blueprints assumed IAM wildcards stop at slashes, whereas a star in the last ARN part expands greedily across the whole path.

Impact

An authenticated attacker could call API endpoints the developer did not intend to allow, particularly where the lambda authorizer policy is the only authorization mechanism.

What the attacker needed

Authenticated user; authorizer policy is sole authorization; star used in policy resource

The fix

AWS updated the documentation and blueprints, and developers should review star usage, add Deny statements, and re-check authorization inside the backend lambda.

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.

An API gateway checks a user's token and then hands back a rule list saying which URLs that user may call. The rule list uses a star as a wildcard, and people assumed the star stops at a slash in the URL. It does not, so a rule meant for one endpoint can quietly cover many others.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.