Skip to content
XSS Disclosed report Advanced

[Variation of #3321406] YetAnother 1-Click Chaining of Self-XSS, Cookie Tossing and AntiCSRF Token Prediction leads to auto approval in AccessTempAuth

A self-XSS in the Browser Isolation email field could be chained with cookie tossing and prediction of the anti-CSRF token to auto-approve Temporary Auth requests. An attacker could trick a victim into approving an access request without the victim's intent.

matured_kazama Follow

Originally disclosed on HackerOne

  • Triaged in 18 hours
  • Fixed in 56 days
  • Paid in 5 months
  • Disclosed after 5 months

Summary by the program

We have resolved an issue in Cloudflare Access where an exploit chain involving the Browser Isolation email field could allow for unauthorized approvals within the Temporary Auth workflow. This has been fully remediated, and we thank the researcher for their help in hardening our authentication flows

Summary by the researcher

Detailed Writeup: https://kazama.in/self-xss-to-cloudflare-single-click-approvals/

The original report as published on HackerOne, by matured_kazama. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is Cloudflare Access, specifically the Temporary Auth workflow and the email field used by Browser Isolation. The disclosed report is a variation of an earlier submission, #3321406, and the title names the chain: Self-XSS, cookie tossing and AntiCSRF token prediction, leading to automatic approval in AccessTempAuth.

The public text is short. The program's summary states that an issue was resolved in Cloudflare Access where an exploit chain involving the Browser Isolation email field could allow unauthorised approvals within the Temporary Auth workflow. The program says the issue has been fully remediated and thanks the researcher for helping harden its authentication flows. The researcher's own summary consists of a single line pointing to a detailed write-up hosted on their personal site:

Text
Detailed Writeup: https://kazama.in/self-xss-to-cloudflare-single-click-approvals/

No requests, payloads, parameters, headers, versions or response bodies appear in the disclosed text, so the individual steps of the chain cannot be reconstructed from it. What the title and summaries establish is the shape of the attack: a self-XSS in the Browser Isolation email field, combined with cookie tossing and prediction of an AntiCSRF token, ending in an approval being granted automatically in the Temporary Auth workflow..

The platform records the weakness as stored cross-site scripting and the severity as high. No CVSS score and no bounty amount are given. The report was disclosed on 14 April 2026.

Root cause

The report does not describe the defect in code. The report does not describe the defect in code; the title names self-XSS, cookie tossing and AntiCSRF token prediction as the components of the chain. Each of these alone might be low impact; together they let an attacker's script run in the right origin and submit a request that the server accepts as legitimate.

Impact

According to the program, the chain could allow unauthorised approvals within the Temporary Auth workflow. The program states the chain could allow unauthorised approvals within the Temporary Auth workflow.

How this kind of bug works

Self-XSS is script execution that only fires when the victim pastes or types attacker-supplied content into a field themselves. On its own it is usually dismissed, because the attacker has to convince the victim to run code in their own session. The classic escalation is to make the payload arrive without the victim noticing: a crafted page that pre-fills a clipboard, a drag-and-drop trick, or a second bug that writes the payload into the field.

Cookie tossing exploits the fact that browsers send cookies for a domain to its subdomains and that a subdomain can set a cookie scoped to the parent domain. If an application trusts a cookie whose name collides with a host-only cookie, an attacker who controls any subdomain (or can otherwise inject a response for one) can shadow the legitimate value. This is often used to fix a session, plant a CSRF token, or force a value the application later reflects.

Anti-CSRF tokens defend against cross-site requests only if an attacker cannot guess them. Tokens derived from predictable inputs (timestamps, usernames, sequential identifiers, weak randomness, or values the attacker can set through cookie tossing) can be computed in advance, which removes the protection entirely.

Chaining these is the point: the self-XSS gives script execution in the target origin, cookie tossing supplies or fixes the values the script needs, and token prediction lets the resulting state-changing request pass CSRF checks. Defences are layered accordingly: strict output encoding and a Content Security Policy to blunt script execution, __Host- cookie prefixes and correct domain scoping to prevent tossing, and cryptographically random, per-session, server-validated CSRF tokens.

How to test for it

  1. Map every field that echoes user input back into a page, especially profile, email and settings fields, and check whether the reflection is HTML-encoded in each context (HTML body, attribute, JavaScript string, URL).
  2. For each reflection, decide whether it is self-XSS only (requires the victim to submit the value) or reachable by an attacker (pre-filled by a link, a stored value, or another user's action).
  3. Enumerate cookies set by the application and by any subdomain you can influence. Look for cookies without the __Host- prefix, cookies with a Domain attribute covering the parent, and cookies whose names collide with security-relevant values.
  4. Capture the anti-CSRF token from several sessions and requests. Compare tokens across sessions, users and time; check whether any part is derived from a value you control or can observe.
  5. Attempt to submit a state-changing request with a token you computed or fixed via cookie tossing, from a cross-site context, and observe whether the server accepts it.
  6. A positive result is a state change (an approval, a settings update, a privilege grant) performed without a legitimate token, ideally demonstrated end to end from an attacker-controlled page.

Common false positives: reflections that are correctly encoded in context, self-XSS that genuinely requires the victim to paste code with no delivery mechanism, tokens that look predictable but are validated against a server-side session, and cookie collisions that the server ignores because it reads only host-only cookies.

How it is fixed

Where a workflow grants approvals, adding an explicit confirmation step that cannot be satisfied by a script alone also reduces the value of a chained XSS.

Hunting notes

Chains like this tend to hide where several weak controls meet: input fields that are only reachable after authentication, subdomains with looser cookie handling than the main application, and older or auxiliary workflows (temporary access, invitations, email verification) that receive less security review than the primary login. Recon signals worth watching are wildcard DNS or many subdomains under the target's parent domain, cookies set without prefixes, anti-CSRF tokens that look short or structured, and any feature that performs an approval or grant with a single click.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Cloudflare Access is a product that controls who can get into a company's internal applications. One of its features is Temporary Auth, a workflow for granting someone access for a limited time, and part of that workflow involves an email field used by Browser Isolation, another Cloudflare product that opens risky web pages in a remote, disposable browser instead of on your own machine.

The disclosed report is a variation of an earlier submission, #3321406. Its title names the chain of weaknesses it describes: Self-XSS, cookie tossing and AntiCSRF token prediction, leading to automatic approval in AccessTempAuth.

The public text is short. The program's summary says an issue was resolved in Cloudflare Access where an exploit chain involving the Browser Isolation email field could allow unauthorised approvals within the Temporary Auth workflow. The program states the issue has been fully remediated and thanks the researcher for helping harden its authentication flows. The researcher's own summary is a single line pointing to a detailed write-up on their personal site:

Text
Detailed Writeup: https://kazama.in/self-xss-to-cloudflare-single-click-approvals/

No requests, payloads, parameters, headers, versions or response bodies appear in the disclosed text, so the individual steps of the chain cannot be reconstructed from it. What the title and the two summaries establish is the shape of the attack: a self-XSS in the Browser Isolation email field, combined with cookie tossing and prediction of an AntiCSRF token, ending in an approval being granted automatically in the Temporary Auth workflow..

The platform records the weakness as stored cross-site scripting and the severity as high. No CVSS score and no bounty amount are given. The report was disclosed on 14 April 2026.

The pieces, explained from zero

A request is the message your browser sends to a server when you click a link or submit a form, asking for a page or asking the server to do something. A cookie is a small piece of text a website asks your browser to store and send back with every later request to that site. Think of it as a wristband a venue gives you at the door: you show it again inside and staff know you already checked in. A token is a value a site generates to prove that a particular request really came from its own pages and not from somewhere else.

XSS (cross-site scripting) means getting a website to run code written by an attacker as if the site itself had written it. Self-XSS is the awkward cousin: the code only runs if the victim personally pastes or types it into a field. On its own it is usually dismissed, because the attacker has to talk the victim into running code in their own session. The classic escalation is to make the payload arrive without the victim noticing: a crafted page that pre-fills the clipboard, a drag-and-drop trick, or a second bug that writes the payload into the field.

Cookie tossing exploits how browsers handle cookies across subdomains. A browser sends cookies for a domain to its subdomains, and a subdomain can set a cookie scoped to the parent domain. If an application trusts a cookie whose name collides with a legitimate one, an attacker who controls any subdomain, or can otherwise inject a response for one, can shadow the real value. This is often used to fix a session, plant a CSRF token, or force a value the application later reflects.

CSRF (cross-site request forgery) is tricking a logged-in user's browser into sending a state-changing request to a site the user trusts. Anti-CSRF tokens defend against this only if an attacker cannot guess them. Tokens derived from predictable inputs (timestamps, usernames, sequential identifiers, weak randomness, or values the attacker can set through cookie tossing) can be computed in advance, which removes the protection entirely.

Why each link matters

  1. The self-XSS gives script execution in the target origin, meaning the attacker's code runs with the site's own privileges.
  2. Cookie tossing supplies or fixes the values that script needs.
  3. Token prediction lets the resulting state-changing request pass the CSRF checks.

Each weakness alone might be low impact. Together they let an attacker's script run in the right place and submit a request the server accepts as legitimate, which is why the chain ends in an approval being granted automatically.

Root cause and impact

The report does not describe the defect in code. The report does not describe the defect in code; the title names self-XSS, cookie tossing and AntiCSRF token prediction as the components of the chain.

According to the program, the chain could allow unauthorised approvals within the Temporary Auth workflow. The program states the chain could allow unauthorised approvals within the Temporary Auth workflow.

In general, how this kind of bug works

Chains like this tend to hide where several weak controls meet: input fields that are only reachable after logging in, subdomains with looser cookie handling than the main application, and older or auxiliary workflows (temporary access, invitations, email verification) that receive less security review than the primary login.

How to test for it

  1. Map every field that echoes user input back into a page, especially profile, email and settings fields, and check whether the reflection is HTML-encoded in each context (HTML body, attribute, JavaScript string, URL).
  2. For each reflection, decide whether it is self-XSS only (requires the victim to submit the value) or reachable by an attacker (pre-filled by a link, a stored value, or another user's action).
  3. Enumerate cookies set by the application and by any subdomain you can influence. Look for cookies without the __Host- prefix, cookies with a Domain attribute covering the parent, and cookies whose names collide with security-relevant values.
  4. Capture the anti-CSRF token from several sessions and requests. Compare tokens across sessions, users and time; check whether any part is derived from a value you control or can observe.
  5. Attempt to submit a state-changing request with a token you computed or fixed via cookie tossing, from a cross-site context, and observe whether the server accepts it.
  6. A positive result is a state change (an approval, a settings update, a privilege grant) performed without a legitimate token, ideally demonstrated end to end from an attacker-controlled page.

Common false positives: reflections that are correctly encoded in context, self-XSS that genuinely requires the victim to paste code with no delivery mechanism, tokens that look predictable but are validated against a server-side session, and cookie collisions that the server ignores because it reads only host-only cookies.

How it is fixed

Where a workflow grants approvals, adding an explicit confirmation step that cannot be satisfied by a script alone also reduces the value of a chained XSS.

Hunting notes

Recon signals worth watching are wildcard DNS or many subdomains under the target's parent domain, cookies set without prefixes, anti-CSRF tokens that look short or structured, and any feature that performs an approval or grant with a single click.

Glossary

  • Cloudflare Access: a product that controls who can reach a company's internal applications.
  • Temporary Auth: an Access workflow for granting someone access for a limited time.
  • Browser Isolation: a Cloudflare product that opens risky web pages in a remote, disposable browser instead of on the user's machine.
  • Request: the message a browser sends to a server asking for a page or an action.
  • Cookie: a small piece of text a site asks the browser to store and send back with later requests to that site.
  • Token: a value a site generates to prove a request came from its own pages.
  • XSS (cross-site scripting): getting a site to run attacker-written code as if the site had written it.
  • Self-XSS: XSS that only fires when the victim pastes or types the payload themselves.
  • Cookie tossing: setting a cookie from a subdomain so it shadows a legitimate cookie for the parent domain.
  • CSRF (cross-site request forgery): tricking a logged-in user's browser into sending a state-changing request to a trusted site.
  • Anti-CSRF token: a value used to prove a state-changing request came from the site's own pages.
  • Output encoding: converting characters so that user input is displayed as text rather than interpreted as code.
  • Content Security Policy: a browser rule that limits which scripts a page may run.
  • __Host- prefix: a cookie naming rule that stops a cookie being set from a subdomain.
  • Domain attribute: the part of a cookie that says which domains and subdomains it applies to.
  • State-changing request: a request that alters something on the server, such as an approval or a settings change.
  • False positive: a finding that looks like a bug but is not exploitable in practice.
  • CVSS: a standard scoring system for the severity of a vulnerability.

More by matured_kazama

View all

6 more disclosed reports, best first.

More from Cloudflare Public Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.