Yet Another CASB Integration Takeover of Active Integrations
Cloudflare CASB's Microsoft integration suffered from a confused deputy problem where an attacker could create a new integration pointing to an existing customer's Microsoft tenant. By manipulating the casing of the tenant UUID, an attacker who could enumerate a valid tenant UUID could surface sensitive information from that tenant.
Originally disclosed on HackerOne
- Triaged in 8 hours
- Fixed in 6 days
- Paid in 6 days
- Disclosed after 3 months
Summary by the program
Cloudflare CASB on the Microsoft integration, was vulnerable to the confused deputy problem. This was previously reported in another HackerOne report (#1952124) however a bypass was found which consisted of manipulating the casing of Microsoft’s tenant UUID. If an attacker, via a brute force attack or another mechanism, was able to enumerate a valid Microsoft tenant UUID that an existing Cloudflare CASB customer had integrated with, then the attacker would have been able to create a new integration which could surface sensitive information. Cloudflare's CASB engineering team rapidly implemented a fix to disallow the ability to create multiple integrations pointing to the same tenant, thus nullifying the attack as an option.
What the report shows
This is a report against Cloudflare CASB, specifically its Microsoft integration. The summary is written by the program rather than the researcher, and it describes a confused deputy problem: an attacker could create a new CASB integration that pointed at a Microsoft tenant already integrated by an existing Cloudflare CASB customer, and that new integration could then surface sensitive information belonging to that customer.
The program notes that the underlying issue had been reported before, in another HackerOne report (#1952124). What made this submission different was a bypass of the earlier fix. The bypass consisted of manipulating the casing of Microsoft's tenant UUID. The bypass consisted of manipulating the casing of Microsoft's tenant UUID, so a differently-cased variant of the same UUID was accepted.
The attack therefore depended on the attacker knowing a valid Microsoft tenant UUID that a Cloudflare CASB customer had already integrated. The summary says this could be obtained through a brute force attack or another mechanism. With a valid UUID in hand, the attacker could create a new integration pointing at that tenant.
The outcome was a fix by Cloudflare's CASB engineering team. The team disallowed the creation of multiple integrations pointing to the same tenant. That nullified the attack as an option.
Root cause
The report does not describe the underlying code, but the bypass suggests a uniqueness check on the tenant identifier that did not normalise the value before comparing it. If the check treats the tenant UUID as an opaque string, then two values that differ only in letter case are seen as different tenants, even though Microsoft resolves both to the same tenant. The earlier fix was bypassed by the casing variation.
More broadly, this is the confused deputy pattern: the CASB holds credentials and permissions granted by the customer, and it acts on the attacker's request using that authority. The attacker never needs the customer's credentials, only an identifier that the service accepts as pointing at the customer's tenant.
Impact
According to the summary, a successful attacker could create a new integration that surfaced sensitive information from the victim customer's Microsoft tenant. The report does not enumerate which data, and it does not describe how the surfaced data would be returned to the attacker. The precondition is significant: the attacker must first obtain a valid tenant UUID belonging to an existing customer, whether by brute force or another mechanism. Without that identifier the attack does not proceed.
How this kind of bug works
A confused deputy arises when a privileged component accepts an identifier from an unprivileged party and then uses its own authority on that party's behalf, without confirming that the party is entitled to that identifier. In SaaS-to-SaaS integrations the pattern is common: a platform stores OAuth tokens or app credentials for many customer tenants, and an API lets users configure which tenant to connect. If the configuration endpoint does not verify that the requesting user belongs to, or is authorised for, the tenant being connected, the platform will happily attach someone else's tenant to the attacker's account.
The subtlety here is identifier handling. Tenant identifiers, account numbers, organisation IDs and similar values are often case-insensitive, aliasable, or available in several formats (GUID with and without braces, upper and lower case, with and without hyphens). A duplicate check that compares raw strings will miss equivalent forms. The same class of weakness appears whenever a service deduplicates on a canonical-looking value but the downstream system accepts variants.
Defences are straightforward in principle: canonicalise identifiers before any comparison, and authorise the connection rather than merely deduplicating it. Deduplication alone is a weak control because it only prevents a second integration, not an unauthorised first one.
How to test for it
- Identify features where your account can be linked to an external tenant, workspace, organisation or account, and where the platform then reads data using its own stored credentials.
- Create a legitimate integration with a tenant you control and capture the request that registers it. Note every identifier in the body: tenant ID, organisation ID, domain, resource path.
- Attempt to register a second integration pointing at the same tenant from a different account or context. If it is rejected, you have found the duplicate check.
- Try equivalent representations of the same identifier: change letter case, add or remove braces or hyphens, use a different but equivalent format, or supply a domain instead of an ID. A positive result is a second integration that is accepted and then returns data belonging to the original tenant.
- Also test whether the check can be bypassed by creating the integration first and changing the identifier afterwards, or by racing two creation requests.
A positive result looks like data from a tenant you do not own appearing in your account. Common false positives are integrations that are accepted but return nothing, or that return only data you already had access to; those show a validation gap but not necessarily a confused deputy. Be careful not to test against tenants you do not control.
How it is fixed
Canonicalise identifiers before comparison: normalise case, strip formatting characters, and resolve aliases to a single internal value. Enforce uniqueness on that canonical value. More importantly, authorise the link: verify that the requesting user has administrative rights over the tenant being connected, typically through an OAuth consent flow that proves control. Rate-limit and monitor integration creation to make enumeration of tenant identifiers impractical, and log attempts to connect tenants that are already integrated.
Hunting notes
This bug class hides in integration marketplaces, data-loss-prevention and CASB products, backup and migration tools, and anything that stores third-party API tokens on behalf of customers. Recon signals include endpoints that accept a tenant or organisation identifier in the request body, error messages that distinguish "already connected" from "not found" (which also enables enumeration), and documentation that mentions connecting an existing account. If you cannot show data crossing the boundary, describe the validation gap precisely and let the program judge severity.
What happened, in plain words
Cloudflare CASB is a security product that connects to other companies' cloud services, here Microsoft's. To do that, a customer links their Microsoft account to Cloudflare once, and Cloudflare keeps a record of that link. This report is about a flaw in how those links were created for Microsoft accounts.
The flaw is called a confused deputy problem. Imagine a receptionist at an office building who holds keys to every tenant's office. If you tell the receptionist "let me into office 4B", and the receptionist checks only that 4B is a real office and not whether you rent it, they will unlock the door for you using their own authority. The receptionist is the deputy, and they are confused about whose request they are serving. Here, Cloudflare CASB is the deputy: it holds the permissions a customer granted, and it acts on a request from whoever asks.
The program's summary explains the chain. If an attacker could learn a valid Microsoft tenant UUID that an existing Cloudflare CASB customer had already connected, the attacker could create a new integration pointing at that same tenant. That new integration could then surface sensitive information from the victim's Microsoft environment. A tenant UUID is a long identifier that Microsoft assigns to each organisation's account; think of it as the account number for a company's Microsoft space.
The underlying issue had been reported before, in another HackerOne report (#1952124). What made this submission different was a bypass of the earlier fix. The bypass consisted of manipulating the casing of Microsoft's tenant UUID. The bypass consisted of manipulating the casing of Microsoft's tenant UUID, so a differently-cased variant of the same UUID was accepted. In plain terms: if the guard's list said "4b" and you asked for "4B", a strict letter-by-letter comparison would treat those as two different offices, even though they are the same door.
The attack therefore depended on the attacker knowing a valid Microsoft tenant UUID that a Cloudflare CASB customer had already integrated. The summary says this could be obtained through a brute force attack or another mechanism. Brute force means trying many guesses automatically until one works. With a valid UUID in hand, the attacker could create a new integration pointing at that tenant.
CVSS is a standard scoring system for how serious a vulnerability is, where higher numbers mean more risk.
The outcome was a fix by Cloudflare's CASB engineering team. The team disallowed the creation of multiple integrations pointing to the same tenant. That nullified the attack as an option.
Root cause
The report does not describe the underlying code, but the bypass suggests a uniqueness check on the tenant identifier that did not normalise the value before comparing it. Normalising means converting a value to one standard form before you compare it, the way you might lowercase every name before checking a guest list so that "Smith" and "smith" count as the same person. If the check treats the tenant UUID as an opaque string, meaning it looks only at the exact characters and nothing else, then two values that differ only in letter case are seen as different tenants, even though Microsoft resolves both to the same tenant. The earlier fix was bypassed by the casing variation.
More broadly, this is the confused deputy pattern: the CASB holds credentials and permissions granted by the customer, and it acts on the attacker's request using that authority. The attacker never needs the customer's credentials, only an identifier that the service accepts as pointing at the customer's tenant.
Impact
According to the summary, a successful attacker could create a new integration that surfaced sensitive information from the victim customer's Microsoft tenant. The report does not enumerate which data, and it does not describe how the surfaced data would be returned to the attacker. The precondition is significant: the attacker must first obtain a valid tenant UUID belonging to an existing customer, whether by brute force or another mechanism. Without that identifier the attack does not proceed.
In general, how this kind of bug works
A confused deputy arises when a privileged component accepts an identifier from an unprivileged party and then uses its own authority on that party's behalf, without confirming that the party is entitled to that identifier. In SaaS-to-SaaS integrations, meaning one online service connecting to another on a customer's behalf, the pattern is common: a platform stores OAuth tokens or app credentials for many customer tenants, and an API lets users configure which tenant to connect. OAuth is the standard way a service asks a user for permission to access another service without sharing the password. If the configuration endpoint does not verify that the requesting user belongs to, or is authorised for, the tenant being connected, the platform will happily attach someone else's tenant to the attacker's account.
The subtlety here is identifier handling. Tenant identifiers, account numbers, organisation IDs and similar values are often case-insensitive, aliasable, or available in several formats (GUID with and without braces, upper and lower case, with and without hyphens). A GUID is another name for a UUID. A duplicate check that compares raw strings will miss equivalent forms. The same class of weakness appears whenever a service deduplicates on a canonical-looking value but the downstream system accepts variants.
Defences are straightforward in principle: canonicalise identifiers before any comparison, and authorise the connection rather than merely deduplicating it. Deduplication alone is a weak control because it only prevents a second integration, not an unauthorised first one.
In general, how to test for it
- Identify features where your account can be linked to an external tenant, workspace, organisation or account, and where the platform then reads data using its own stored credentials.
- Create a legitimate integration with a tenant you control and capture the request that registers it. Note every identifier in the body: tenant ID, organisation ID, domain, resource path.
- Attempt to register a second integration pointing at the same tenant from a different account or context. If it is rejected, you have found the duplicate check.
- Try equivalent representations of the same identifier: change letter case, add or remove braces or hyphens, use a different but equivalent format, or supply a domain instead of an ID. A positive result is a second integration that is accepted and then returns data belonging to the original tenant.
- Also test whether the check can be bypassed by creating the integration first and changing the identifier afterwards, or by racing two creation requests.
A positive result looks like data from a tenant you do not own appearing in your account. Common false positives are integrations that are accepted but return nothing, or that return only data you already had access to; those show a validation gap but not necessarily a confused deputy. Be careful not to test against tenants you do not control.
In general, how it is fixed
Canonicalise identifiers before comparison: normalise case, strip formatting characters, and resolve aliases to a single internal value. Enforce uniqueness on that canonical value. More importantly, authorise the link: verify that the requesting user has administrative rights over the tenant being connected, typically through an OAuth consent flow that proves control. Rate-limit and monitor integration creation to make enumeration of tenant identifiers impractical, and log attempts to connect tenants that are already integrated.
In general, where to look
This bug class hides in integration marketplaces, data-loss-prevention and CASB products, backup and migration tools, and anything that stores third-party API tokens on behalf of customers. Recon signals include endpoints that accept a tenant or organisation identifier in the request body, error messages that distinguish "already connected" from "not found" (which also enables enumeration), and documentation that mentions connecting an existing account. If you cannot show data crossing the boundary, describe the validation gap precisely and let the program judge severity.
Glossary
- CASB: Cloud Access Security Broker, a product that sits between a company and its cloud services and watches for risky activity.
- Integration: a saved connection between two services, here between Cloudflare CASB and a customer's Microsoft account.
- Tenant: an organisation's own space inside a cloud service such as Microsoft 365, with its own users and data.
- UUID / GUID: a long, unique identifier made of letters, digits and hyphens, used to name an account or object.
- Case-insensitive: treated as the same value whether written in upper or lower case.
- Confused deputy: a privileged service that performs an action for someone who is not entitled to it, because it trusts an identifier without checking ownership.
- Brute force: trying many guesses automatically until one is correct.
- Normalise / canonicalise: convert a value to one standard form before comparing it.
- Opaque string: a value treated as raw characters, with no understanding of what it means.
- OAuth: a standard way for one service to get limited access to another on a user's behalf, without the user sharing a password.
- Token: a credential a service stores so it can act on a user's behalf later.
- API: a programmatic interface that lets software send requests to a service.
- Endpoint: a specific address in an API that accepts a particular kind of request.
- Deduplication: preventing the same thing from being registered twice.
- Enumeration: discovering valid identifiers, often by trying many candidates.
- Rate-limit: a cap on how many requests can be made in a period of time.
- CVSS: a standard score for the severity of a vulnerability, where higher means more serious.
- False positive: a result that looks like a bug but is not one.