> 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-bucket-encrypted-using-customer-managed-key-cmk-with-overly-permissive-policy.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS S3 bucket encrypted using Customer Managed Key (CMK) with overly permissive policy

### Synopsis

| Field               | Value                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                              |
| Finding Type        | AWS S3 bucket encrypted using Customer Managed Key (CMK) with overly permissive policy |
| Finding ID          | 60000832                                                                               |
| Generates a Finding | This detection rule also generates a finding                                           |
| Severity            | Medium                                                                                 |
| Category            | CONFIGURATION                                                                          |
| Cloud Providers     | AWS                                                                                    |
| Platform Module     | CSPM                                                                                   |
| Asset Types         | S3\_BUCKET                                                                             |

### Description

Overly permissive key policies on AWS S3 buckets encrypted with Customer Managed Keys (CMKs) allow unauthorized access to sensitive data, leading to data breaches and compliance violations.

AWS S3 utilizes Customer Managed Keys (CMKs) for encryption, stored and managed within AWS Key Management Service (KMS). A misconfigured KMS key policy granting excessive permissions to untrusted principals, exposes the encryption key. Attackers exploiting this misconfiguration can decrypt and access sensitive data stored in the S3 bucket.

The impact of this misconfiguration includes data breaches, financial losses, reputational damage, and regulatory penalties for non-compliance. Restricting permissions to only necessary principals minimizes the potential impact of a compromised key. Following the principle of least privilege ensures only authorized entities can access the encryption key.

Mitigate this risk by implementing least privilege access controls on the KMS key policy. Grant required permissions only to trusted entities and services requiring access. Regularly review and audit the KMS key policy to identify and remove unnecessary permissions. Use a strong, unique CMK for each S3 bucket, and avoid using wildcard characters in the KMS key policy.

### Remediation

The following steps are recommended to add changes to existing key policy of the KMS key used by the S3 bucket

1. Log in to the AWS Console and navigate to the 'S3' service.
2. Click on the S3 bucket reported in the alert.
3. Click on the 'Properties' tab.
4. Under the 'Default encryption' section, click on the KMS key link in 'Encryption key ARN'.
5. Click on the 'Key policy' tab on the navigated KMS key window.
6. Click on 'Edit'.
7. For each policy statement, use fine-grained and restrictive permissions instead of using wildcards (\* and kms:\*) OR add in appropriate conditions with least privilege access.
8. Click on 'Save Changes'


---

# 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-bucket-encrypted-using-customer-managed-key-cmk-with-overly-permissive-policy.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.
