niche s3 buckets are readable/writeable/deleteable by authorized AWS users
The niche S3 buckets were accessible to authorised AWS users, who could list, download, upload and delete files, potentially reading content, hosting malware or removing files.
- Triaged in 4 days
- Fixed in 5 days
- Paid in 7 days
- Disclosed after 12 months
Hi All, I've discovered that the AWS buckets by niche, niche-s3-production, is accessible for authorized AWS users using the AWS command line tools.
##Issue As such, I have confirmed:
- I can list all files in the bucket with the command
aws s3 ls s3://niche-s3-production - I can copy files from the server with the command
aws s3 cp s3://niche-s3-production/[PATH]/[FILE] ./ - I can copy to the server with
aws s3 cp test.txt s3://niche-s3-production - I can remove files with
aws s3 rm s3://niche-s3-production/[PATH]/[FILE]
You will see that I have left the empty file test.txt in the bucket root.
This also impacts the niche-s3-development and niche-s3-staging buckets.
##Vulnerability
- Authorized AWS users can access any content in the publics (I only tested downloading one file from the compaign_posts path because files can have their own permissions)
- People can host and serve viruses from your buckets
- Twitter staff may unknowingly download a virus from what they think is a trusted bucket when they think files may have been placed in specific locations by other coworkers
##Remediation Remediation is to review, audit and update all buckets owned by niche and the access control lists so this is not available to authorized users, only via the web through an authorized account controlled by the site.
Pete
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the bucket access control lists or policies granted permissions to all authorised AWS users rather than restricting access to specific accounts or roles.
Impact
Authorised AWS users could access bucket content, host and serve viruses, and staff might unknowingly download malware; development and staging buckets were also affected.
What the attacker needed
An authorised AWS account
The fix
The buckets' access control lists should be reviewed and updated so that only a controlled authorised account can access them, not all authorised AWS users.
How it was found
- List the contents of the production bucket using the AWS CLI.
- Download a file from a specific path in the bucket.
- Upload a test file to the bucket root.
- Delete a file from the bucket.
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 report has not been written yet. The Original tab links to the source.
The report says these folders were open to authorised AWS users, not just the company's own staff. That means such a user could look at, download, upload or delete files.
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.