Check provider logo

CloudTrail trail S3 bucket is not publicly accessible

cloudtrail_logs_s3_bucket_is_not_publicly_accessible

Severitycritical
Servicecloudtrail
by Prowler

CloudTrail log destination S3 buckets are inspected for ACL grants that expose data to the public AllUsers group.

Buckets hosted in other accounts are flagged for out-of-scope review.

Risk

Exposed CloudTrail logs erode confidentiality and integrity.

Adversaries can harvest API activity to map accounts, roles, and keys, enabling reconnaissance and evasion. If write is allowed, logs can be poisoned or deleted, thwarting investigations and compromising incident timelines.

Run this check with Prowler CLI

prowler aws --checks cloudtrail_logs_s3_bucket_is_not_publicly_accessible

Fix finding with Prowler CLI

prowler aws --checks cloudtrail_logs_s3_bucket_is_not_publicly_accessible --fixer

Recommendation

Apply least privilege to the log bucket:

  • Enable S3 Block Public Access (account and bucket)
  • Remove AllUsers/AuthenticatedUsers ACLs; avoid wildcard principals
  • Permit only CloudTrail and constrain with aws:SourceArn

Use a dedicated private bucket and monitor for permission changes.

Remediation

CLI

aws s3api put-bucket-acl --bucket <example_resource_name> --acl private

Native IaC
Terraform
Other
  1. Open the AWS S3 Console
  2. Select the bucket used by CloudTrail
  3. Go to Permissions > Access control list (ACL)
  4. Click Edit under Public access, remove any grants to "Everyone (public access)" (uncheck Read/Write)
  5. Save changes

Source Code

Resource Type

AwsS3Bucket

References

Depends On

  • s3_bucket_public_access