Amazon S3 bucket policies are evaluated for public write permissions (e.g., s3:PutObject, s3:Delete*, or s3:*). Account or bucket Public Access Block that restricts public buckets is considered when determining exposure.
Risk
Public write access lets anyone upload, overwrite, or delete objects, undermining integrity and availability. Attackers can plant malware, stage phishing content, poison data, or wipe buckets, causing outages and potential legal and cost impacts from storage abuse and content hosting.
prowler aws --checks s3_bucket_policy_public_write_access
prowler aws --checks s3_bucket_policy_public_write_access --fixer
Recommendation
Restrict writes to trusted principals using least privilege; avoid Principal: "*". Enable Public Access Block at account and bucket levels for defense in depth. Prefer IAM roles over broad bucket policies, require private access paths, and enable versioning to recover from unwanted changes.
Remediation
aws s3api put-public-access-block --bucket <BUCKET_NAME> --public-access-block-configuration RestrictPublicBuckets=true
- Open the AWS S3 console and select the target bucket
- Go to the Permissions tab
- Under Block public access (bucket settings), click Edit
- Enable "Block public and cross-account access to buckets and objects through any public bucket or access point policies"
- Click Save changes
Source Code
Resource Type
AwsS3Bucket