ACSESSED: Cross-tenant network bypass in Azure Cognitive Search
A feature called 'Allow access from Portal' in Azure Cognitive Search let anyone with a valid Azure Resource Manager access token from any tenant reach the data plane of a network-isolated instance. An attacker with the instance name, subscription ID, resource group, API key and index name could query private data from any location.
Published on mnemonic.io
This blog post provides a technical description of a 0-day vulnerability that I found in Microsoft Azure back in February 2022.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The portal proxy only checked that the access token was valid and issued for the Azure Resource Manager audience, without verifying that it belonged to the same tenant as the search instance or that the principal had read permissions on the data plane.
Impact
Any ACS instance with the feature enabled could be queried from any tenant and location, including instances exposed only on private endpoints or with no network exposure at all, provided the attacker had the required identifiers and API key.
What the attacker needed
Target instance name; subscription ID; resource group name; valid API key for the data plane
The fix
Microsoft removed the portal proxy design and now requires users to expose the service on a private endpoint or whitelist their client IP address; the invoke method was disabled.
How it was found
- Deploy an Azure Cognitive Search instance with all network access disabled and only 'Allow access from Portal' enabled.
- Import sample data and confirm the data can be queried through the portal's search explorer.
- Inspect the instance configuration and note that the network rule bypass is set to 'AzurePortal'.
- Observe that portal requests go to a shared proxy host and carry an access token plus the instance API key.
- Obtain an Azure Resource Manager access token from any tenant and send a request to the proxy's invoke endpoint with the target instance details.
- Retrieve search results from the network-isolated instance using the cross-tenant token.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Azure Cognitive Search is a cloud search service. A new button called 'Allow access from Portal' was meant to let you use the Azure portal to query your search service even when its network was locked down. Instead, the portal acted as a shared proxy that accepted a login token from any Azure account, so anyone who knew the right details could read the search data even though the service was supposed to be private.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.