> 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/aws-s3-buckets-are-accessible-to-any-authenticated-user.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS S3 buckets are accessible to any authenticated user

### Synopsis

| Field               | Value                                                   |
| ------------------- | ------------------------------------------------------- |
| Rule Type           | Detection                                               |
| Finding Type        | AWS S3 buckets are accessible to any authenticated user |
| Finding ID          | 60000032                                                |
| Generates a Finding | This detection rule also generates a finding            |
| Severity            | Medium                                                  |
| Category            | CONFIGURATION                                           |
| Cloud Providers     | AWS                                                     |
| Platform Module     | CSPM                                                    |
| Asset Types         | S3\_BUCKET                                              |
| ATT\&CK Tactic      | TA0004 (TA0004)                                         |
| ATT\&CK Technique   | T1078.004 (T1078.004)                                   |

### Description

AWS S3 buckets configured with overly permissive access controls allow any authenticated user to access sensitive data. This misconfiguration exposes data to unauthorized internal users or compromised credentials.

AWS S3 buckets offer various access control mechanisms, including bucket policies and access control lists (ACLs). Incorrectly configuring these settings, allowing access to 'authenticated users', bypasses intended restrictions. Attackers with legitimate AWS credentials, even those with limited privileges, could access sensitive data stored in the bucket, leading to data breaches and potential regulatory violations.

Data breaches resulting from this misconfiguration can cause significant financial losses, reputational damage, and legal repercussions. Implementing least privilege access control ensures only authorized users and services can access specific S3 buckets and their contents, thereby minimizing the impact of compromised credentials.

To mitigate this risk, restrict bucket access to specific IAM users, roles, or groups using granular policies. Implement strong access control lists, limiting access only to trusted IPs and services. Regularly review and audit bucket policies and ACLs to ensure appropriate access controls are maintained and updated as needed.

### Remediation

**Manual steps:**

S3 Bucket - This finding indicates that an AWS S3 bucket is configured to allow access to any authenticated AWS user. This means that anyone with valid AWS credentials can access the contents of the bucket, potentially exposing sensitive data. This significant security risk should be addressed immediately:

1. **Login to the AWS Console:** Access the AWS Management Console using your AWS account credentials.
2. **Navigate to the 'S3' service:** In the AWS console, search for and select the 'S3' service.
3. **Click on the 'S3' resource reported in the alert:** Locate the specific S3 bucket identified in the alert and click on it.
4. **Click on the 'Permissions' tab:** Within the S3 bucket details, select the 'Permissions' tab.
5. Under 'Public access', Under 'Access control list (ACL)', choose 'Edit'. To undo permissions for anyone with an AWS account, beside 'Authenticated Users group (anyone with an AWS account)', remove the selection from the following ACL permissions: Objects - List, Bucket ACL - Read.
6. **Click on Save:** After making the necessary changes, click on the 'Save changes' button to apply the new permissions settings.

**Note:** Carefully review the changes before saving them. Unchecking these options may impact the functionality of your application if it relies on public access to the S3 bucket. It is recommended to test the changes thoroughly in a non-production environment before implementing them in production.

**CLI code:**

S3 Bucket - This command sets the access control list (ACL) of the S3 bucket to private, restricting access to only the bucket owner. This prevents any authenticated AWS users from accessing the bucket's contents:

```bash
aws s3api put-bucket-acl --bucket ${entity} --acl private --region ${entity}
```

**Terraform code:**

S3 Bucket - This code will modify the ACL of the S3 bucket to restrict access to only the bucket owner:

```hcl
resource "aws_s3_bucket_acl" "restrict_bucket_access" {
  bucket = aws_s3_bucket.example.id
  acl    = "private"
}
```


---

# 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/aws-s3-buckets-are-accessible-to-any-authenticated-user.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.
