Inside the Entra ID actor token flaw that broke tenant isolation
CVE-2025-55241 let a token minted in one Entra ID tenant act as any user, Global Admins included, in another. A teardown of Actor tokens, the unsigned wrapper around them, the tenant check Azure AD Graph skipped, why Conditional Access and logs missed it, and five lessons for multi-tenant identity.
By The Xalgorix Team
On 14 July 2025, researcher Dirk-jan Mollema of Outsider Security reported a bug to the Microsoft Security Response Center that he later summed up in one line: it “could have allowed me to compromise every Entra ID tenant in the world”, probably excepting national cloud deployments. Starting from a tenant he controlled, he could act as any user, Global Administrators included, in someone else's tenant. Microsoft pushed a fix to production three days later and published CVE-2025-55241 on 4 September 2025 with a CVSS 3.1 score of 10.0 and the weakness class CWE-287, improper authentication.
Because the flaw lived in Microsoft's own service, customers had nothing to patch, and the MSRC advisory lists it as neither publicly disclosed nor exploited at release. So why revisit it? Because the root cause is one that turns up in ordinary multi-tenant SaaS code all the time: a resource server that checked a token was genuine but never checked that it belonged to the tenant being accessed. This teardown walks through the two tokens involved, the missing check, how an attacker found someone to impersonate, why tenants could neither block nor see it, and what builders of multi-tenant identity should take from it.
Two tokens, and only one of them signed
The bug sat at the junction of two pieces of legacy plumbing. The first is the Actor token, issued by what Mollema describes as the “Access Control Service”, a legacy component used for SharePoint authentication and service-to-service calls inside Microsoft. Exchange Online, for example, requests Actor tokens so it can act on behalf of users against Exchange, SharePoint and the Azure AD Graph API. An Actor token is a normal signed JWT and is valid for about 24 hours.
The second is the impersonation token a service builds around it. The service takes its Actor token, places it inside an actortoken claim, adds claims naming the user it wants to act as, and sends the result to the target API. That outer wrapper is unsigned: its header says alg: none. The trust model was that the signed Actor token vouched for the service, and the service was trusted to say which user it was acting for.
A simplified sketch of the decoded wrapper, with placeholder values (this is an illustration of the structure Mollema documented, not a working token):
// header
{ "alg": "none", "typ": "JWT" }
// payload (simplified)
{
"actortoken": "<signed Actor token issued to the service>",
"aud": "00000002-0000-0000-c000-000000000000/graph.windows.net@<tenant-id>",
"iss": "00000002-0000-0ff1-ce00-000000000000@<tenant-id>",
"nameid": "<netId of the user to act as>",
"upn": "ignored by Azure AD Graph",
"nbf": ..., "exp": ...
}Two details matter. Azure AD Graph identified the user by nameid alone, which carries the user's netId; the upn, smtp and sip claims were only read by Exchange and SharePoint. And because the wrapper is unsigned, everything in it, including the tenant ID in the audience, is whatever the sender writes.
The check Azure AD Graph skipped
Mollema obtained Actor tokens in his own lab tenant by using a credential on that tenant's Exchange Online service principal, the same arrangement hybrid Exchange setups rely on. He then edited the tenant ID in the unsigned wrapper to point at a different tenant where his test users did not exist. Azure AD Graph did not reject the token as coming from the wrong tenant. It answered that the user could not be found.
That error message was the whole vulnerability in miniature. The API had validated the Actor token's signature, accepted the wrapper, and moved straight on to looking up the named user in the tenant the wrapper asked for. Nothing compared the tenant the Actor token was issued in with the tenant being accessed. Supply a netId that does exist in the victim tenant and the lookup succeeds, and the request runs as that user.
Finding someone to impersonate
The victim's tenant ID can be resolved from any of its domain names through public endpoints, so the real constraint was a valid netId. Mollema's write-up gives three ways to get one:
- Leaked tokens. The
netIdappears as thepuidclaim in Entra ID access tokens. Any token that ends up in a log, a ticket or a screenshot reveals it, and expiry does not help: the identifier outlives the token. - Guessing.
netIdvalues are allocated incrementally rather than randomly. Mollema reports gaps of roughly 100,000 to 100 million between a fresh user in his tenant and the newest users in other tenants he examined, and estimates that brute force would take minutes to hours without being noisy. - Hopping through B2B guests. When a user is invited as a guest into another tenant, their home
netIdis stored on the guest object'salternativeSecurityIdsattribute. With access to tenant A, an attacker can read the homenetIdof any guest from tenant B, impersonate that user in tenant B, read the guests stored there, and repeat. Mollema estimates two API calls per tenant and points out that consultants invited into many customer tenants make the graph densely connected.
Once any user in the victim tenant could be impersonated, the rest was routine: list the Global Administrators, read one of their netId values, and build a new wrapper naming that admin. From there the attacker had whatever a Global Admin has, which includes any service that trusts the tenant for sign-in and, because Global Admins can grant themselves rights on Azure subscriptions, the tenant's Azure resources too.
Why tenants could not block it or see it
Hardened tenants were exposed exactly like default ones. Mollema notes that Actor tokens are not subject to Conditional Access or similar policies and cannot be revoked during their validity window, so no tenant setting stood between the token and the API. Visibility was just as thin:
- Requesting an Actor token produced no log entry.
- The unsigned wrapper never touched Entra ID's sign-in pipeline, so its creation and use produced no sign-in logs either.
- Azure AD Graph had no API-level request logging available to tenants, so read-only enumeration of users, groups, roles and policies left nothing behind.
Writes were the exception. Directory changes made through the impersonated session showed up in the Entra audit log with an odd shape: the actor was the impersonated user's UPN, but the display name was that of a Microsoft service such as Office 365 Exchange Online. Mollema published a KQL query built on that artifact. Groups are excluded because Exchange Online legitimately makes some group changes this way:
AuditLogs
| where not(OperationName has "group")
| where not(OperationName == "Set directory feature on tenant")
| where InitiatedBy has "user"
| where InitiatedBy.user.displayName has_any ( "Office 365 Exchange Online",
"Skype for Business Online", "Dataverse", "Office 365 SharePoint Online",
"Microsoft Dynamics ERP")Read the result for what it is. A hit is worth investigating; an empty result only says that no matching writes are in your retained logs. It cannot tell you whether someone read the directory, and audit-log retention on many tenants does not reach back to mid-2025 anyway.
Timeline
The August date in the middle is worth noticing. Azure AD Graph had been on a retirement path since 2019, and Microsoft's migration guide lists 31 August 2025 as the end of extended access. A CVSS 10.0 cross-tenant bug sat in an API whose only remaining commitment, per that same page, was security fixes. Microsoft's fix restricts Actor tokens for Azure AD Graph to Microsoft's internal services. Mollema adds that Microsoft has not said how many other services still rely on Actor tokens.
Five lessons for anyone building multi-tenant identity
You are unlikely to build an Actor token service. You are quite likely to build a multi-tenant API that accepts tokens, a service account that acts for users, or an internal identifier you assume nobody can guess. Each of those carries a smaller version of this bug.
1. Authenticate, then authorize against the tenant. A valid signature answers “who issued this?”. It does not answer “may it touch this tenant?”. Compare the token's tenant with the tenant the request targets, and resolve users by tenant and ID together, so a lookup can never wander into another tenant's rows:
// Runs after signature, issuer, audience and expiry checks.
function requireTenant(req, res, next) {
const claims = req.auth; // verified token claims
const target = req.params.tenantId; // tenant this request touches
if (claims.tid !== target) return res.status(403).end();
// Delegated calls: if your actor claim records where the acting
// service was authorized, it must be the same tenant.
if (claims.act && claims.act.tid !== target) return res.status(403).end();
next();
}
// Never look a user up by a global ID alone.
const user = await db.users.findOne({ tenantId: claims.tid, id: subjectId });If you also run the issuer side, the issuer-binding advice in our guide to JWKS rotation for JWT verifiers is the same idea one layer down: a key that verifies a token says nothing about which tenant's token it should be.
2. Sign every claim you act on. The signed inner token was sound. The authority lived in the unsigned outer layer, where the user and the tenant were named. If a wrapper adds claims that change who the request runs as, either sign the wrapper or carry the delegation in a signed token from the start; OAuth 2.0 Token Exchange (RFC 8693) defines an act claim for exactly this.
3. Identifiers are not secrets. Sequential IDs, IDs printed inside tokens and IDs copied onto guest objects will all leak eventually. Design as if every user ID is public. Random IDs make enumeration harder, but they should be a speed bump, never the control.
4. Service paths need the same policy plane. Conditional Access protected interactive sign-ins and did nothing here, because the Actor token path never passed through it. Inventory every way a token can be minted for your platform, including service-to-service and support tooling, and confirm each one hits your revocation, policy and logging.
5. Log reads on legacy surfaces, or retire them. The quietest part of this attack was the reconnaissance, because reads on Azure AD Graph were invisible to tenants. Old API versions tend to keep their original authorization logic and lose their owners. If an endpoint is too old to log properly, that argues for turning it off, not for trusting it.
What defenders can still do
- Run the KQL above across whatever audit history you retain, and keep it as a standing detection for writes initiated by a user but attributed to a Microsoft service display name.
- Inventory anything in your tenant still calling Azure AD Graph and move it to Microsoft Graph, which offers request-level activity logs.
- Review your Entra external collaboration settings. Restricting what guests can read about other directory objects shrinks the information a guest account exposes, whatever the next cross-tenant bug turns out to be.
- Treat leaked access tokens as identity disclosures even after they expire: the
puidthey carry outlives the token.
One honest limit. Nobody outside Microsoft could have found this by scanning their own tenant, and that includes automated pentesting tools such as Xalgorix: the flaw lived in a provider's control plane and showed itself only to someone holding tokens from two tenants. The same shape in your own product, a token from tenant A accepted for tenant B, is very testable. Mint credentials in two tenants, replay each against the other's resources, and treat anything other than a refusal as a finding.
Ready to see it prove a bug?
Start scanning on Cloud →