Because the malicious code runs under the compute instance’s identity context. If that context has broad managed identity permissions, the attacker can move from script modification to Key Vault access, role changes, and other cloud resources that the identity can already reach.
Why Azure Machine Learning script execution becomes a privilege boundary issue
The risk appears because the notebook, job, or script is not running in a neutral sandbox. It executes with the compute instance’s assigned identity, so any permissions already attached to that identity become the attacker’s next move. In Azure environments, that often means management-plane access, secret retrieval, or further privilege changes rather than a simple code-only compromise.
That matters most when the compute identity was granted convenience-based access instead of narrowly scoped, task-specific access. Once an attacker can modify or influence the code path, they inherit the identity’s reach and can turn a local execution issue into broader cloud control.
How the abuse path expands beyond the original script
The escalation is usually linear: alter the script, wait for execution, then use whatever the identity can already touch. If the compute instance can read Key Vault, change role assignments, or call Azure Resource Manager actions, the malicious code can pivot from data access to environment control without needing a separate credential theft step.
That is why this class of issue is best understood as delegated authority abuse. The attacker is not “breaking out” of Azure machine learning in the abstract, they are abusing a trusted execution context that already has cloud rights. Azure Key Vault Contributor escalation 2024 shows how a broad role can become secret-reading power, while Storm-2949 Azure Breach illustrates how one cloud identity can be used as a springboard into wider tenant compromise.
For teams assessing the blast radius, the key question is not whether the workload is “machine learning” or “automation.” The key question is what the assigned identity can do if its code path is subverted, because that determines whether the issue stays at job execution or becomes tenant-level privilege escalation.
What controls actually reduce the blast radius
The practical control is to treat the compute instance identity like any other privileged cloud principal: scope it tightly, avoid standing permissions, and separate read-only model/data access from administrative capabilities. If the workload only needs to run training and read a small set of inputs, it should not also be able to edit role assignments, enumerate secrets, or manage adjacent resources.
That is why privilege design, secret access, and session-level governance belong in the review of these environments. Cloud PAM and CIEM Guide is useful here because it frames effective permissions and escalation paths, while Just-in-Time Access and Zero Standing Privilege Guide supports the operational decision to remove persistent elevation from identities that only need it occasionally.
When a workload must reach secrets or privileged resources, use the minimum possible role surface and verify whether the same outcome can be achieved without giving the compute identity direct administrative reach. If the answer is no, the environment should be treated as high blast-radius and monitored accordingly.
Risk and Threat Considerations
The main risk is privilege reuse: one compromised script can inherit a cloud identity that was intended for legitimate automation, then use that trust to reach secrets, keys, and management actions. The more broadly the identity is scoped, the more likely a code-injection issue becomes a cloud-wide compromise problem.
Failure mechanism: malicious code executes in the compute context, then invokes whatever permissions are attached to that managed identity, including secret retrieval, resource changes, or role-related actions.
Impact: the attacker can expand from a single job compromise into lateral movement across Azure resources, often with access that looks legitimate because it is using an already-authorized identity.
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 and MITRE ATT&CK address the attack surface, NIST SP 800-53 Rev 5 sets the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | Compute identities with broad cloud rights create the escalation path described. |
| NHI-07 — Long-Lived Secrets | Broad access often persists because secrets and credentials remain usable too long. | |
| Recommendation — Reduce compute identity permissions to the minimum needed for the job. Rotate and expire credentials that the compute context can reach. | ||
| NIST SP 800-53 Rev 5 | IA-9 — Identification and Authentication (Non-Organizational Users) | The issue centers on a service-style identity authenticating to Azure resources. |
| AC-6 — Least Privilege | Privilege escalation occurs when the execution identity has more access than required. | |
| IA-5 — Authenticator Management | Secret and token handling determines whether the attacker can reuse the workload authority. | |
| Recommendation — Restrict machine-to-machine authentication to narrowly scoped trusted services. Limit each workload identity to the minimum permissions needed. Protect, rotate, and revoke authenticators tied to the compute identity. | ||
| ISO/IEC 27001:2022 | A.5.15 — Access control | The question is fundamentally about controlling what the workload identity can reach. |
| A.8.2 — Privileged access rights | Escalation risk depends on excess privileged rights on the compute identity. | |
| Recommendation — Define and enforce access rules for the Azure ML execution identity. Review and restrict privileged rights attached to cloud workloads. | ||
| MITRE ATT&CK | T1528 — Steal Application Access Token | Attackers often pivot by abusing tokens or identity material available to the workload. |
| Recommendation — Hunt for token theft and unusual use of workload credentials. | ||
Practitioner Guidance
What to verify: confirm exactly which Azure roles, Key Vault permissions, and management-plane actions are assigned to the compute identity, then compare that list to the minimum required for the workload. If the identity can alter privileges or read sensitive secrets, treat the configuration as materially over-scoped.
Decision rule: if a compute instance identity can affect resources beyond the immediate training or inference task, reduce its permissions before you investigate whether the script was intentionally malicious or only opportunistically modified. The blast radius comes from the authority already attached, not just from the payload itself.
Practitioner takeaway: In Azure Machine Learning, the security boundary is the identity attached to execution, so privilege escalation risk is controlled by shrinking that identity’s reach before an attacker gets a chance to use it.
Related resources from NHI Mgmt Group
- Why does Azure elevate access create such a high-risk privilege escalation path?
- Why does access to a managed identity token create privilege escalation risk in Azure?
- Why does a sudo heap overflow create such a high-risk privilege escalation issue?
- Why do Windows and Azure privilege-escalation bugs increase lateral movement risk?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 10, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org