A Chain of Vulnerabilities Leading to Critical Information Disclo
A forgotten AWS Cognito client ID in public JavaScript allowed self-service signup despite the UI blocking it, giving access to internal API endpoints. These endpoints had stored XSS, SSRF, IDORs, and a local file inclusion flaw that let an attacker read sensitive files like .env and database backups.
Hi everyone, I hope you’re doing well. In this first article, I’ll be sharing how I discovered and chained together multiple vulnerabilities that ultimately allowed me to access internal files from a restricted application dashboard.
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 a misconfigured Cognito client that still allowed signups, combined with legacy API endpoints lacking proper access controls and input sanitisation.
Impact
An attacker could create an account, access internal APIs, execute stored XSS, perform SSRF to bypass Nginx restrictions, and read sensitive files including .env with credentials and database backups.
What the attacker needed
Access to public JavaScript files; AWS CLI installed; Email for confirmation code
How it was found
- Find a second Cognito ClientId in the JavaScript bundles that still allows signup.
- Use the AWS CLI to sign up and confirm an account with that ClientId.
- Log in to the application and access internal API endpoints directly.
- Test the product description field for stored XSS.
- Test the image retrieval endpoint for SSRF by changing the url parameter.
- Use directory traversal in the template download endpoint to read files like .env.
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.
The app used a login service called AWS Cognito, and a leftover setting in its public code let anyone create an account even though the signup button was hidden. Once inside, the tester found several bugs, including one that let them read files on the server that should have been private.
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.