Skip to main content

A Bucket-Level Public Access Block Only Masks a Permissive ACL Until It Is Loosened

High severityAmazon Web Services About 20 minutes to fix

Overview

Enabling S3 Block Public Access at the bucket level blocks a pre-existing public bucket ACL grant but does not remove it. The grant is masked rather than deleted and takes effect again if the setting is loosened, so the ACL itself needs correcting.

At a glance

Symptom
A team enables all four Public Access Block settings directly on an S3 bucket and expects the bucket to be fully private, then finds…
Likely cause
S3 access evaluation combines several independent layers: account-level Block Public Access, bucket-level Block Public Access, bucket policy, bucket ACL and object ACL.
Impact
Objects intended to be private remain reachable by anonymous or authenticated AWS users through the pre-existing ACL grant, even though the bucket-level Public Access Block indicator shows all…
Verification signal
Validation must independently confirm object-level reachability rather than trusting console indicators alone.Query the bucket ACL again after correction and confirm no grant remains for AllUsers or AuthenticatedUsers.Confirm account-level…
Safe correction
The correction addresses the ACL grant directly rather than relying on Public Access Block alone to neutralise it.
Rollback or recovery
If removing the ACL grant or enabling account-level Block Public Access breaks a legitimate access pattern, such as a static website or cross-account integration, reverse the change in…

Symptom

A team enables all four Public Access Block settings directly on an S3 bucket and expects the bucket to be fully private, then finds during a review that a legacy bucket ACL grant to the AllUsers or AuthenticatedUsers group is still present on the bucket, masked rather than removed, and that account-level Block Public Access was never confirmed as enabled.

The bucket console shows Public Access Block as “On” for all four settings at the bucket level. Engineers reasonably conclude the bucket is closed to public access. Bucket ACL history is not reviewed because the team assumes Public Access Block supersedes ACLs entirely going forward.

False Assumption

The team assumed that enabling bucket-level Public Access Block settings is equivalent to removing public grants, and that it applies uniformly regardless of account-level configuration or pre-existing ACL grants that predate the setting change.

In fact, Public Access Block operates as independent boolean settings (BlockPublicAcls, IgnorePublicAcls, BlockPublicPolicy, RestrictPublicBuckets) that must each be true at the relevant scope for the intended effect, and S3 applies the most restrictive combination of the account-level and bucket-level settings.

With IgnorePublicAcls on at the bucket, the legacy grant is ignored but not removed: if account-level Block Public Access was never enabled, anyone who later turns IgnorePublicAcls off on the bucket (to fix an integration, say) makes the old grant enforceable again at once.

Root Cause

S3 access evaluation combines several independent layers: account-level Block Public Access, bucket-level Block Public Access, bucket policy, bucket ACL and object ACL. Each layer is evaluated on its own terms. BlockPublicAcls only prevents new public ACLs from being applied going forward; it does not retroactively strip existing public grants already present on the bucket.

IgnorePublicAcls is the specific setting that causes S3 to disregard existing public ACL grants during authorisation decisions. If IgnorePublicAcls is false at both the bucket and the account level, any pre-existing public ACL grant is honoured; if it is true at either, the grant is ignored but stays in place.

This is documented AWS behaviour: Block Public Access settings are additive controls layered over existing permissions models, not a single override switch. The Well-Architected Reliability Pillar describes operational resilience practices consistent with treating access-control changes as verifiable, evidence-based operations rather than assumed-correct toggles: a control that appears “on” in a console still requires confirmation that its effective scope actually removes the exposure it is meant to close.

Impact

The bucket is protected only for as long as nobody loosens its Public Access Block settings. Once IgnorePublicAcls is turned off at the bucket while the account-level setting is off, objects intended to be private become reachable by anonymous or authenticated AWS users through the pre-existing ACL grant, with no new grant or policy change to flag it in review.

The latent exposure is easy to miss: the bucket ACL still lists a public grantee that the console reports as blocked, producing confusing results during a manual spot check.

The operational consequence is a false sense of closure: a review that checks only the bucket-level Public Access Block indicators will report the bucket as protected, while the latent exposure persists until the underlying ACL grant is removed and account-level Block Public Access is confirmed.

Diagnosis

Confirm the actual effective access state rather than relying on the bucket-level indicator alone.

  • Retrieve the bucket-level Public Access Block configuration and confirm all four settings are true.
  • Retrieve the account-level Public Access Block configuration separately; a bucket-level “On” state does not confirm the account-level state.
  • Retrieve the bucket ACL directly and inspect grants for the AllUsers or AuthenticatedUsers predefined groups.
  • Retrieve the bucket policy and confirm whether it independently permits or denies public access, since policy and ACL are evaluated as separate layers.
  • Cross-reference S3 Access Analyzer or Storage Lens findings, if enabled, for buckets reported public despite Block Public Access appearing enabled.

Correction

The correction addresses the ACL grant directly rather than relying on Public Access Block alone to neutralise it. Every change below must be applied and verified by a human operator with confirmed permissions in an isolated or non-production environment before any production change.

  1. Confirm the current bucket ACL contents and identify the exact grantee URI responsible for the public grant.
  2. Enable account-level Block Public Access if it is not already enabled, so IgnorePublicAcls takes effect uniformly across the account rather than only at the bucket the team happened to check.
  3. Replace the bucket ACL with a private ACL that removes the public grantee, rather than depending solely on IgnorePublicAcls to mask it; masking leaves the grant present and re-exposable if Public Access Block is later disabled elsewhere.
  4. Where feasible, move to the Bucket owner enforced object ownership setting, which disables ACLs for the bucket and every object in it, existing objects included (the bucket ACL must be private first, as in step 3), subject to confirming application compatibility with any existing ACL-based access pattern first.

Validation

Validation must independently confirm object-level reachability rather than trusting console indicators alone.

  • Query the bucket ACL again after correction and confirm no grant remains for AllUsers or AuthenticatedUsers.
  • Confirm account-level Block Public Access shows all four settings enabled.
  • Attempt an unauthenticated read of a designated, non-sensitive test object created specifically for this check, and confirm it is denied.
  • Confirm S3 Access Analyzer or an equivalent finding no longer reports the bucket as publicly accessible, allowing time for the finding to refresh.

Rollback

If removing the ACL grant or enabling account-level Block Public Access breaks a legitimate access pattern, such as a static website or cross-account integration, reverse the change in a controlled, verified sequence rather than restoring the original public grant blindly.

  1. Identify the specific broken access pattern and confirm with the consuming team whether public ACL access was the intended mechanism or an unreviewed legacy artefact.
  2. If a legitimate need exists, replace the removed grant with a scoped bucket policy limited to specific principals or conditions, rather than reinstating the broad AllUsers or AuthenticatedUsers grant.
  3. If temporary restoration of prior behaviour is required while the scoped policy is designed, restore only the previously recorded ACL grant using the ACL JSON captured before the change, and set an explicit stop condition: this restoration is temporary and must be replaced with a scoped policy within an agreed short window, owned by a named individual.
  4. Record the rollback action, the reason, and the follow-up owner so the temporary reopening is not forgotten and is tracked to closure.

Prevention

Treat Public Access Block as one layer among several, not a single switch that supersedes ACLs and policy. Enable account-level Block Public Access as the baseline control for the account rather than relying on per-bucket settings alone. Adopt Bucket owner enforced object ownership on new buckets so ACLs are disabled by default, removing this failure path for future resources.

Include an explicit ACL and bucket policy review, not just a Public Access Block indicator check, in any access control audit or change validation for S3 resources handling material data.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Control to implement

The correction addresses the ACL grant directly rather than relying on Public Access Block alone to neutralise it.

Validate the vendor-specific syntax in official documentation before applying it.

4

When to escalate

Validation and rollback are covered in the sections above.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Last updated

Corrections

  • : Corrected during a review of published articles. Details

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

More from KBY that goes with this config trap.

Discover more

Connected KBY resources