Solution to Fix the vulnerability
1. Disable Public Access at Bucket Level
Go to AWS Console → S3 → [Your Bucket] → Permissions
Turn off all “Public access” options.
2. Use Bucket Policies to Explicitly Deny Public Access
This prevents all users (even anonymous) from reading the bucket files unless over HTTPS and via authenticated requests.
3. Audit and Remove Public ACLs
aws s3api get-bucket-acl --bucket your-bucket-name
Look for below and If found, remove it:
4. Use IAM Roles Instead of Public Access
- Give access to specific users, apps, or services
- Use IAM Roles with tight permissions (least privilege)
Example policy: