
Microsoft has addressed an information disclosure vulnerability, tracked as CVE-2021-42306, affecting Azure AD.
The vulnerability received a CVSS score of 8.1. Due to a misconfiguration in Azure, Automation Account “Run as” credentials (PFX certificates) ended up being stored in clear text in Azure AD and anyone with access to information on App Registrations can access them.
An information disclosure vulnerability manifests when a user or an application uploads unprotected private key data as part of an authentication certificate keyCredential on an Azure AD Application or Service Principal. This vulnerability allows a user or service in the tenant with application read access to read the private key data that was added to the application.Azure AD addressed this vulnerability by preventing disclosure of any private key values added to the application.
Microsoft Advisory
An attacker could use these credentials to authenticate as the App Registration, typically as a Contributor on the subscription containing the Automation Account.
An attacker can exploit this flaw to escalate privileges to Contributor of any subscription that has an Automation Account, then access resources in the affected subscriptions, including sensitive information stored in Azure services and credentials stored in key vaults.
The issue could be potentially exploited to disable or delete resources and take entire Azure tenants offline.Microsoft addressed the flaw by preventing Azure services from storing clear text private keys in the keyCredentials property and by preventing users from reading any private key data that has been stored in clear text.

