Check ID: kms_key_not_publicly_accessible
Provider: AWS
Service: kms
Severity: CRITICAL
Categories: internet-exposed, identity-access
Resource type: AwsKmsKey

What this check verifies

KMS keys are assessed for excessive access in key policies or grants, including * principals and broadly scoped permissions to multiple identities.

Risk

Broad access to a KMS key enables unauthorized kms:Decrypt and data-key generation, breaking confidentiality. With admin rights, attackers can change policies or schedule deletion, undermining control integrity and threatening availability of data dependent on the key.

Recommendation

Apply least privilege to KMS keys:
  • Restrict principals to specific roles and accounts
  • Prefer narrow, time-bound grants
  • Separate key administration from usage
  • Use conditions to limit context
  • Review regularly and remove wildcard or cross-account exposure

Remediation

aws kms put-key-policy --key-id <example_resource_id> --policy-name default --policy '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::<account_id>:root"},"Action":"kms:\*","Resource":"\*"}]}'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = kms_key_not_publicly_accessible. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks