Azure Key Vault Publicly Accessible or Over-Permissive
The key vault accepts connections from any network and grants more identities, or broader rights, than needed, so one compromised identity can read the secrets it holds.
| Severity | Medium |
| CVSS 3.1 | 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Open in the calculator |
| CVSS 4.0 | 7.1 CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-732: Incorrect Permission Assignment for Critical Resource |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1555.006 Cloud Secrets Management Stores |
| Category | Security Misconfiguration |
Description
Azure Key Vault stores secrets, keys and certificates, which often include database passwords, API keys and storage connection strings for several applications. Access is controlled in two layers. The network layer decides where the vault can be reached from: public network access can be allowed from all networks, restricted to selected virtual networks and IP address ranges, or disabled in favour of private endpoints. The data layer decides who can read or change the vault's contents, through either Azure role-based access control (RBAC) or the older vault access policy model.
The finding applies where a vault holding sensitive material is reachable from all networks and grants access more widely than needed. Common examples are broad roles such as Key Vault Administrator or Key Vault Secrets Officer assigned at subscription or resource group scope; access policies granting every permission to many users and applications; one shared vault holding the secrets of several applications and environments; and vaults using the access policy model, where any principal with Contributor rights over the vault can add an access policy that grants itself full access to the contents.
Microsoft Entra ID authentication is always required, so the vault is not open to anonymous access, but an attacker who compromises any identity with read access to it, such as a user, an application's credentials or the managed identity of a compromised workload, can retrieve every secret that identity can reach and use those secrets to access the databases, storage accounts and services they protect. Because a vault often serves several applications, one over-permissive assignment can expose credentials well beyond the system first compromised. Public network access lets the attacker do this from anywhere, whereas network restrictions would force them to operate from an allowed network.
The weakness is identified by reviewing the vault's networking settings, permission model, role assignments and access policies, and confirmed by using an identity obtained during testing to list and read secrets from outside the organisation's network.
Remediation
- Use the Azure RBAC permission model, and grant data roles at the vault scope or narrower: Key Vault Secrets User for applications that only read secrets, Key Vault Crypto User for applications that use keys, and administrative roles such as Key Vault Administrator only to the few people who manage the vault. Map existing access policies to roles before switching.
- Remove role assignments and access policies that are not needed, and assign roles to groups or managed identities rather than to individual users.
- Use a separate vault for each application and environment, so that each workload's identity can reach only its own secrets.
- Disable public network access and reach the vault through private endpoints, or restrict it to the virtual networks and address ranges that need it. Allow trusted Microsoft services to bypass the firewall only where a service depends on it.
- Limit who holds Owner, User Access Administrator or Contributor over the vault, since these roles can change its network rules and, depending on the permission model, who can read its contents.
- Send the vault's
AuditEventlogs to a Log Analytics workspace or SIEM, and alert on unusual secret reads.
Rotate any secret that an over-permissive identity could have read. Confirm the fix by reviewing the vault's role assignments and networking again, and by attempting to read secrets with a test identity that holds no data role, and from an address outside the allowed networks, expecting both to be refused.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.