Trailing Slash Bypassed AWS Authentication
TL;DR: A security researcher discovered that adding a trailing slash to AWS HTTP API paths could bypass Lambda authorizer authentication entirely. This critical vulnerability, caused by a path normalization mismatch, enabled unauthorized actions, including wire transfers at a fintech company, highlighting a significant security risk.
Key facts
- Category
- Cybersecurity
- Impact
- Critical
- Published
- Source
- InfoQ
Full summary
A simple trailing slash in AWS HTTP API paths allowed attackers to bypass authentication, leading to unauthorized access and financial transactions.
A security researcher discovered a critical vulnerability in AWS API Gateway where adding a trailing slash to an HTTP API path could completely bypass Lambda authorizer authentication. This seemingly minor modification allowed unauthenticated access to protected backend services. The flaw had severe real-world consequences, as it was exploited to execute unauthorized wire transfers at a fintech company, demonstrating the high-stakes nature of the issue. The exploit was possible because of a fundamental inconsistency in how the API Gateway parsed and processed URL paths, creating a security loophole that attackers could easily leverage without needing any special tools or credentials.
The root cause was identified as a path normalization mismatch between the service's routing and authorization layers. The API Gateway's greedy route matching system correctly identified the route even with the trailing slash, but the authorization component failed to apply the intended security policy to the normalized path. This discrepancy caused the system to default to an "allow" state, effectively leaving the endpoint unprotected. This class of vulnerability is not isolated to AWS; a similar issue was recently disclosed in the gRPC-Go library, underscoring a recurring security challenge in modern web services. The incident serves as a critical reminder for developers and security teams to ensure consistent path handling across their entire application stack to prevent such bypasses.
Why it matters
A single character in a URL bypassed a core AWS security feature, leading to real financial theft. It shows how subtle inconsistencies in cloud services can create major, easily exploitable vulnerabilities, impacting any company relying on them for authentication.
Business impact
The vulnerability enabled direct financial fraud (unauthorized wire transfers), demonstrating a high-risk attack vector for any business using AWS API Gateway for sensitive operations. It erodes trust in managed security services and can lead to significant financial loss, reputational damage, and emergency engineering costs.
⚡ Action needed
AWS has addressed the issue. Teams using AWS HTTP APIs with Lambda authorizers should review access logs for unusual patterns, such as requests with trailing slashes, to identify any potential past exploitation.
Action checklist
- 1Review AWS security bulletins to confirm the patch status for your region.
- 2Audit API Gateway access logs for requests with unexpected trailing slashes.
- 3Verify that your Lambda authorizers are correctly configured and logging all invocation attempts.
- 4Consider implementing a WAF rule to normalize or block unusual URL patterns as an extra layer of defense.
- 5Educate development teams on path normalization vulnerabilities.
Tags
Related on Notifire
Primary source: InfoQ
