S3 bucket is vulnerable to ransomware or deletion via public access

Description

An S3 bucket is publicly accessible and lacks protective configurations against ransomware or data destruction attacks. The bucket’s policy or ACLs allow public write access, versioning is not enabled, Object Lock default retention is not configured, and MFA Delete is not enabled. This means an external attacker can directly overwrite or delete bucket contents without authentication. This attack path enables ransomware-style attacks where data is deleted or overwritten with encrypted versions and held for ransom.

Remediation

  1. Enable S3 Block Public Access at both the account and bucket level to prevent unauthorized public write access.
  2. Enable S3 versioning to maintain previous versions of objects, allowing recovery from accidental or malicious deletions.
  3. Enable S3 Object Lock with default retention to automatically protect new objects from being deleted or overwritten.
  4. Enable MFA Delete to require multi-factor authentication for permanent deletion of object versions.