Subscribe to the Non-Human & AI Identity Journal

Notifications
Clear all

XSS plus OAuth: are your web controls still keeping up?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 15051
Topic starter  

TL;DR: A DOM-based XSS flaw can be chained with OAuth login flows to bypass HTTP-only cookies and extract account tokens, creating account takeover risk even in environments with strong web hardening, according to Salt’s research. The lesson is that application security controls must account for cross-component trust paths, not just single-vulnerability fixes.

NHIMG editorial — based on content published by Salt: XSS and OAuth combine into a modern account takeover path

Questions worth separating out

Q: What breaks when XSS can reach an OAuth login flow?

A: The main failure is that browser script execution can move from a content issue to an identity issue.

Q: Why do browser-based login flows complicate identity security?

A: Because the browser is not a passive channel.

Q: What do security teams get wrong about HTTP-only cookies and CSP?

A: They often treat those controls as if they end the attack, when they mainly reduce one class of abuse.

Practitioner guidance

  • Harden OAuth redirect and return-url handling Remove any browser-readable return URL behaviour that can be influenced by untrusted input.
  • Audit for same-origin token exposure paths Review login flows, pop-up handoffs, fragments, and post-auth redirects for any path where a code, token, or state value can be read by JavaScript running in the application origin.
  • Test browser controls against chained exploitation Verify that HTTP-only, CSP, sanitisation, and framework escaping still hold when an attacker can control navigation, open windows, or influence browser context after script execution.

What's in the full article

Salt's full post covers the technical exploitation path and proof-of-concept detail this post intentionally leaves for the source:

  • Breakpoint-driven analysis of the vulnerable JavaScript flow and the parameter logic that enabled redirect abuse.
  • Step-by-step explanation of how OAuth login handling can expose a usable authorization code to browser-side script.
  • Concrete exploit construction details, including the window-handling technique used to capture the OAuth artifact.
  • The disclosure timeline and remediation context that show how the issue was validated and fixed.

👉 Read Salt's analysis of XSS chaining with OAuth to reach account takeover →

XSS plus OAuth: are your web controls still keeping up?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 14635
 

Cross-origin browser trust is the real failure mode here: the problem is not simply XSS, but the assumption that browser-side protections can safely coexist with identity artifacts in redirect flows. Once an attacker can execute script in-origin, any URL-based token exposure becomes part of the attack surface. Practitioners should treat redirect handling, token placement, and browser execution as one governance domain, not separate controls.

A question worth separating out:

Q: How should IAM and application teams secure OAuth against browser attacks?

A: They should jointly review redirect validation, token exposure, and script execution paths as one workflow. If authorization data can appear in a browser-readable context, it should be treated as sensitive identity material. The goal is to ensure the browser never becomes a viable credential extraction point.

👉 Read our full editorial: XSS and OAuth combine into a modern account takeover path



   
ReplyQuote
Share: