π‘οΈ AWS SQS Queue policy allows public accessπ’
- Contextual name: π‘οΈ Queue policy allows public accessπ’
- ID:
/ce/ca/aws/sqs/queue-public-policy - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ’
- π AWS SQS Queue
- π AWS SQS Queue - object.extracts.yaml
- π§ͺ test-data.json
Similar Policiesβ
- AWS Security Hub: [SQS.3] SQS queue access policies should not allow public access
Descriptionβ
Descriptionβ
This policy identifies Amazon SQS queues whose resource-based policies allow public access to queue messages, queue metadata, or administrative operations.
Rationaleβ
Amazon SQS queues commonly carry application events, workflow instructions, and other operational data. If a queue policy grants public or otherwise overly broad external access, unauthorized parties may be able to send arbitrary messages, read or remove queued messages, or interfere with queue processing.
Public
sqs:SendMessageaccess can be abused to inject malicious or spam messages, trigger downstream workflows, or increase processing costs. Public consumer access, such assqs:ReceiveMessage,sqs:DeleteMessage, orsqs:ChangeMessageVisibility, can expose message contents, disrupt normal processing, or cause message loss. Administrative permissions, such assqs:SetQueueAttributes,sqs:DeleteQueue, orsqs:PurgeQueue, can allow an attacker to weaken protections, remove data, or disable the queue entirely.Access required for AWS services or trusted cross-account integrations should be scoped to explicit principals and restrictive conditions such as
aws:SourceArn,aws:SourceAccount, or equivalent account or organization boundaries.... see more
Remediationβ
Remediationβ
Restrict the Queue Policyβ
Review the queue policy and remove any statements that grant access to
*or to overly broad external principals. Keep access limited to explicitly required AWS accounts, IAM roles, or AWS service principals. When the queue must accept messages from AWS services or trusted external producers or consumers, add restrictive conditions such asaws:SourceArnandaws:SourceAccount.From Command Lineβ
Retrieve the current queue policy:
aws sqs get-queue-attributes \
--queue-url {{queue-url}} \
--attribute-names Policy \
--query 'Attributes.Policy' \
--output text > policy.jsonUpdate
policy.jsonand remove or narrow any statements that allow public access.Ensure that:
- the
Principalis a specific AWS account, IAM role, or service principal;- the
Actionlist contains only the minimum requiredsqs:permissions;- service integrations are constrained with conditions such as
aws:SourceArnandaws:SourceAccount.... see more
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ AWS Foundational Security Best Practices v1.0.0 β πΌ [SQS.3] SQS queue access policies should not allow public access | 1 | no data | |||
| πΌ Cloudaware Framework β πΌ Public Data Access | 12 | no data |