🚀 Join our AI Wargame at Black Hat Asia and our Workshop + Wargame at NDC Sydney .


Missing Customer-Managed Key Encryption on Azure Cosmos DB

The Azure Cosmos DB account does not configure a customer-managed encryption key because key_vault_key_id is omitted from the azurerm_cosmosdb_account resource. As a result, data at rest is protected only by Microsoft-managed keys, reducing customer control over key rotation, revocation, separation of duties, and cryptographic governance. This may violate security or compliance requirements where sensitive data must be encrypted using keys controlled by the organisation.

Remediation

Configure Cosmos DB to use a customer-managed key stored in Azure Key Vault by setting key_vault_key_id. Ensure the Cosmos DB managed identity has the required permissions to access the key, and define a key rotation and revocation process aligned with organisational security requirements.

Metadata

  • Severity: medium
  • Slug: missing-customer-managed-key-encryption-on-azure-cosmos-db

Tags

  • Azure

CWEs

  • 922: Insecure Storage of Sensitive Information

OWASP

  • A02:2021: Cryptographic Failures

Available Labs

Select a language to explore available labs for this vulnerability.

No matching labs found

Try adjusting your language filter.

Deco line
Deco line

Play AppSec WarGames

Want to skill-up in secure coding and AppSec? Try SecDim Wargames to learn how to find, hack and fix security vulnerabilities inspired by real-world incidents.

Deco line
Deco line

Got a comment?

Join our secure coding and AppSec community. A discussion board to share and discuss all aspects of secure programming, AppSec, DevSecOps, fuzzing, cloudsec, AIsec code review, and more.

Read more