> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/data-destruction-risk-due-to-sensitive-data-in-aws-s3-bucket-publicly-accessible-not-configured.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Data destruction risk due to sensitive data in AWS S3 bucket publicly accessible not configured...

### Synopsis

| Field               | Value                                                                                                           |
| ------------------- | --------------------------------------------------------------------------------------------------------------- |
| Rule Name           | Data destruction risk due to sensitive data in AWS S3 bucket publicly accessible not configured with MFA delete |
| Rule Type           | Detection                                                                                                       |
| Finding Type        | Data destruction risk due to sensitive data in AWS S3 bucket publicly accessible not configured with MFA delete |
| Finding ID          | 60001242                                                                                                        |
| Generates a Finding | This detection rule also generates a finding                                                                    |
| Severity            | High                                                                                                            |
| Category            | POSTURE                                                                                                         |
| Cloud Providers     | AWS                                                                                                             |
| Platform Module     | CSPM                                                                                                            |
| Asset Types         | S3\_BUCKET                                                                                                      |

### Description

Publicly accessible AWS S3 buckets without MFA delete enabled pose a significant data destruction risk if they contain sensitive information. Unauthorized actors could potentially delete data without authorization, leading to data loss and business disruption.

Attackers might exploit publicly accessible S3 buckets to gain unauthorized access. They could then delete sensitive data, causing irreversible data loss and potentially impacting compliance and legal obligations. This risk is amplified by the absence of MFA delete, which would allow unauthorized deletion without additional authentication.

Mitigate this risk by immediately enforcing stricter access controls on the S3 bucket. Restrict access to only authorized users and groups using appropriate IAM policies. Enable 's3:DeleteObject' permission only for authorized users requiring this capability. Additionally, enable MFA delete on the bucket to add an extra layer of protection against unauthorized deletions.

To prevent future occurrences, implement a robust security configuration management process. Regularly review and audit S3 bucket permissions, ensuring only necessary permissions are granted. Enforce the principle of least privilege and always enable MFA delete for buckets containing sensitive data.

### Remediation

```
[PUBLIC_ACCESS]
```

1. Log in to the AWS Console
2. Navigate to the 'S3' service
3. Click on the S3 resource reported in the alert
4. Click on the 'Permissions' tab
5. If Access Control List is set to 'Public' follow the below steps
   1. Under 'Access Control List', Click on 'Everyone' and uncheck all items
   2. Under 'Access Control List', Click on 'Authenticated users group' and uncheck all items
   3. Click on Save changes
6. If 'Bucket Policy' is set to public follow the below steps
   1. Under 'Bucket Policy', Select 'Edit Bucket Policy' and consider defining what explicit 'Principal' should have the ability to PUT/CREATE/REPLICATE/DELETE objects in your S3 bucket. You may also want to specifically limit the 'Principal' ability to perform specific PUT/CREATE/REPLICATE/DELETE functions, without the wild card.

      If 'Bucket Policy' is not required delete the existing 'Bucket Policy'.
   2. Click on Save changes

Note: Make sure updating 'Access Control List' or 'Bucket Policy' does not affect S3 bucket data access.

```
[MISCONFIGURATION]
```

Using console you can enable versioning on the bucket but you cannot enable MFA delete.

You can do it via only with the AWS CLI:

```
aws s3api put-bucket-versioning --bucket <BUCKET_NAME> --versioning-configuration Status=Enabled,MFADelete=Enabled --mfa '<MFA_SERIAL_NUMBER> <MFA_CODE>'
```

NOTE: The bucket owner, the AWS account that created the bucket (root account), and all authorized IAM users can enable versioning, but only the bucket owner (root account) can enable MFA Delete. Successful execution will enable the S3 bucket versioning and MFA delete on the bucket.

```
[DATA_EXPOSURE]
```

1. Make sure the resource is not exposed to public.
2. Delete or move the sensitive data if it is mistakenly place


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/data-destruction-risk-due-to-sensitive-data-in-aws-s3-bucket-publicly-accessible-not-configured.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
