TL;DR: Attackers can abuse over-privileged Azure Managed Identities by first obtaining code execution on a VM, then querying IMDS for a trusted token that inherits the machine’s cloud permissions, according to Unosecur. The risk is not a CVE but a governance failure, and least-privilege plus runtime monitoring are now the decisive controls.
At a glance
What this is: This analysis explains how Azure IMDS token abuse turns a single VM foothold into cloud-wide identity misuse when managed identities are overprivileged.
Why it matters: For IAM and NHI teams, the issue shows how workload identity trust can become the attack path when RBAC is broad and IMDS activity is not monitored.
By the numbers:
- 90% of IT leaders say properly managing NHIs is essential for a successful zero-trust implementation.
- Only 5.7% of organisations have full visibility into their service accounts.
- 71% of NHIs are not rotated within recommended time frames, increasing the risk of compromise over time.
👉 Read Unosecur's analysis of Azure managed identity token abuse via IMDS
Context
Azure managed identity token abuse is a governance problem, not a software defect. When a workload identity inherits broad permissions from the VM it sits on, any code execution on that host can become a trusted path into cloud APIs without a password or MFA challenge. For IAM teams, the core issue is that the identity boundary and the execution boundary are no longer safely separated.
That matters because cloud programs often grant managed identities the same convenience-driven scope they would give a long-lived admin account. The article’s scenario is therefore not unusual in cloud-heavy environments, but it is operationally dangerous: one local compromise can expand into Key Vault access, storage access, or control-plane actions if RBAC is too broad and IMDS is left unmonitored.
Key questions
Q: How should security teams reduce Azure managed identity abuse risk?
A: Start by shrinking the permissions attached to each managed identity, then monitor how those identities behave at runtime. The right control is least-privilege RBAC plus log correlation between host execution, IMDS access, and subsequent Azure API activity. If the identity can touch more than the workload truly needs, attackers can turn one VM compromise into broader cloud access.
Q: Why is Azure IMDS abuse hard to detect?
A: IMDS abuse is hard to detect because the token request can look like normal local workload activity until you correlate it with the surrounding context. The dangerous pattern is not the token alone, but the sequence of a VM foothold, an IMDS call, and identity use against new resources. That makes telemetry correlation essential.
Q: What is the difference between token theft and privilege escalation in managed identity attacks?
A: Token theft is the moment the attacker obtains a valid Azure access token from IMDS. Privilege escalation happens when that token carries broader permissions than the workload really needs, allowing the attacker to modify resources, access secrets, or move laterally. In managed identity abuse, the token is the vehicle and excessive RBAC is the amplifier.
Q: When should organisations treat a VM compromise as an identity incident?
A: Organisations should treat a VM compromise as an identity incident when the VM hosts a managed identity with meaningful cloud permissions. If the attacker can query IMDS, the machine may already have become a trusted authentication source. At that point, revocation, entitlement review, and secret rotation matter as much as host containment.
Technical breakdown
How Azure IMDS turns local execution into token theft
Azure Instance Metadata Service, or IMDS, is a local endpoint available to workloads running on an Azure VM. If an attacker gains code execution on that VM, a request to IMDS with the metadata header can return an OAuth access token for the attached managed identity. The key design point is that IMDS trusts locality, not human intent. That makes the boundary strong only when the workload itself is trusted and tightly contained. If the VM is compromised, the identity becomes the prize, because the token is accepted by Azure control-plane and data-plane services as if the workload were legitimate.
Practical implication: Treat any host compromise as potential identity compromise and build detection around IMDS access plus subsequent API use.
Why overprivileged managed identities create cloud blast radius
Managed identities are intended to remove secret handling, but they do not remove authorization risk. Their effective power is defined by RBAC assignments, so a Reader role limits damage while Contributor or Owner roles can let an attacker modify resources, invoke RunCommand, or reach sensitive data stores. This is why the article frames the issue as misconfiguration rather than vulnerability. The attack succeeds when identity scope exceeds the real workload need, and the resulting blast radius is controlled by entitlement design, not by patching.
Practical implication: Review every managed identity for least-privilege scope and remove broad roles that are justified only by convenience.
Correlating VM execution, IMDS queries, and workload identity use
The most useful detection chain is behavioral, not signature-based. A suspicious sequence starts with an execution event on a VM, followed by a request to 169.254.169.254 for IMDS, and then a managed identity using its new token against unexpected Azure resources. By itself, each event can look routine. Together, they show that a local process has likely minted a trusted cloud credential and is now operating as the workload identity. This is why workload telemetry and identity telemetry must be joined in the same control plane.
Practical implication: Correlate host activity with AADManagedIdentitySignInLogs and Azure Activity Logs to flag token abuse early.
Threat narrative
Attacker objective: The attacker wants to convert one compromised VM into trusted cloud access that can exfiltrate data, modify workloads, or widen control over the environment.
- Entry occurs when the attacker gains code execution on an Azure VM through RCE, SSRF, RunCommand abuse, or compromised administrative access.
- Credential access follows when the attacker queries Azure IMDS and receives a managed identity OAuth token tied to the VM.
- Escalation and impact occur when that token is replayed against Azure APIs for control-plane actions, Key Vault access, or cross-resource movement.
Breaches seen in the wild
- Salesloft OAuth token breach — hackers stole OAuth tokens to access Salesforce data via Salesloft.
- Azure Key Vault privilege escalation exposure — Azure Key Vault Contributor role misconfiguration enabled privilege escalation.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Managed identity abuse is a trust-model failure before it is a detection problem. The article’s scenario shows that Azure workloads are only as safe as the permissions attached to their identities. If a local process can mint a trusted token and that token carries broad scope, the cloud platform will do exactly what it was told to do. Practitioners should therefore treat identity scope as part of the attack surface, not just an access control setting.
Ephemeral token issuance does not compensate for excessive privilege. Removing passwords and MFA prompts reduces certain attack paths, but it can also create a false sense of safety when the workload identity itself is over-scoped. The decisive control is not token format, it is entitlement design plus runtime telemetry. Teams should assume that any untrusted code path on a VM can inherit the machine’s identity unless segmented out by design.
Identity blast radius is now the right way to frame cloud risk. A single managed identity can touch data, configuration, and orchestration layers at once, which means one compromise can cross boundaries that traditional network segmentation never sees. That makes workload identity governance a board-relevant control plane issue, not a niche cloud hardening task. Security teams should measure how far one token can travel before they measure how fast they can rotate it.
Least privilege must be enforced at the workload edge, not only in review cycles. Periodic entitlement audits help, but they do not stop an active attacker who already has code execution on a VM. The practical standard is continuous governance: narrow roles, isolate sensitive workloads, monitor IMDS use, and alert on identity behaviour that does not match the workload’s normal purpose. That is how managed identity risk becomes containable.
From our research:
- 90% of IT leaders say properly managing NHIs is essential for a successful zero-trust implementation, according to the Ultimate Guide to NHIs.
- Our research also shows that 97% of NHIs carry excessive privileges, which helps explain why identity compromise can expand faster than perimeter controls can respond.
- For a broader root-cause view, The 52 NHI breaches Report shows how overprivilege, exposed secrets, and weak lifecycle controls keep recurring across incidents.
What this signals
Identity blast radius is becoming the best predictor of cloud compromise impact. As Azure workloads adopt more managed identities, teams need to measure how far a token can travel across control-plane and data-plane services before an incident occurs. The more a single identity can do, the more a local compromise behaves like an environment compromise.
With 90% of IT leaders already saying proper NHI management is essential for zero trust, the operational gap is no longer conceptual. Security programmes should now treat workload identity telemetry as a first-class control source, not a supplement to host monitoring.
The next maturity step is continuous entitlement suppression for machine identities. That means narrower roles, stronger change control for elevated access, and alerting that ties VM execution to identity behaviour. For most enterprises, the goal is not perfect prevention. It is making sure one compromised workload cannot impersonate the rest of the cloud.
For practitioners
- Audit managed identity scope on every Azure VM Inventory all VM-bound managed identities and remove Contributor, Owner, or other broad roles unless there is a documented operational need. Prefer narrowly scoped Reader or data-plane roles and validate that each assignment matches the workload’s actual function.
- Correlate host events with IMDS and identity logs Join VM execution telemetry, Azure Activity Logs, and AADManagedIdentitySignInLogs so a local execution event followed by IMDS access becomes an alertable chain. Prioritise sequences that show a new resource target or unusual API burst after token issuance.
- Restrict RunCommand and VM admin access Limit RunCommand usage and administrative access to named, audited principals with just-in-time approval where possible. Remove standing access that can be abused to create the initial foothold needed for IMDS token theft.
- Harden the initial access paths into Azure workloads Patch hosted applications quickly, reduce SSRF exposure, and monitor for suspicious user agents or requests to 169.254.169.254. The managed identity attack chain depends on a first foothold, so reducing that foothold narrows the entire abuse path.
Key takeaways
- Azure managed identity abuse is a trust failure that turns local code execution into cloud identity misuse.
- Overprivileged RBAC and unmonitored IMDS activity are the conditions that make the attack scalable.
- IAM teams should respond with least privilege, telemetry correlation, and tighter workload segmentation before the next foothold becomes a cloud breach.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Managed identity token abuse hinges on identity sprawl and excessive trust in workload credentials. |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access for machine identities maps directly to access management controls. |
| NIST Zero Trust (SP 800-207) | The attack exploits implicit trust in a local workload path, which zero trust aims to eliminate. |
Inventory Azure managed identities and remove unnecessary privileges from every workload-bound identity.
Key terms
- Managed Identity: A managed identity is a cloud-native service identity attached to a workload so it can authenticate without stored credentials. In Azure, the platform issues tokens on behalf of that workload, which reduces secret handling but increases the need to govern scope, host trust, and runtime behaviour.
- Instance Metadata Service: Instance Metadata Service, or IMDS, is a local endpoint that exposes instance information and, in Azure, can mint tokens for attached managed identities. It is designed for trusted workloads on the host, so compromise of the machine can become compromise of the identity if access is not tightly controlled.
- Identity Blast Radius: Identity blast radius is the amount of damage a compromised identity can cause before it is contained. For non-human identities, it is determined by permissions, reachable resources, and whether the identity can cross control-plane and data-plane boundaries. Smaller blast radius is the practical goal of least privilege.
- Workload Identity Telemetry: Workload identity telemetry is the set of logs and signals that show how machine identities authenticate and what they access afterward. It gives defenders the evidence needed to correlate host execution with token use, detect unusual resource access, and separate legitimate automation from abuse.
What's in the full article
Unosecur's full blog post covers the operational detail this post intentionally leaves for the source:
- Step-by-step detection logic for correlating Azure Activity Logs with AADManagedIdentitySignInLogs
- Specific response actions for isolating a compromised VM and revoking excess RBAC assignments
- Examples of IMDS-associated user agents and resource-access patterns that may indicate abuse
- Unosecur's product mapping for continuous identity risk monitoring in Azure environments
Deepen your knowledge
Managed identity governance and workload identity hardening are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building a programme around Azure workloads and ephemeral tokens, it is worth exploring.
Published by the NHIMG editorial team on 2026-03-23.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org