Every threat

Script Execution in Your Origin

Infrastructure / Transport · Elevated priority

An attacker gets code running with your page privileges, one way or another.

How Passkey Accounts™ addresses this

Passkey Accounts™ keeps no login secret that running script could lift

Script in the origin still cannot become the authenticator

Example scenario

No policy blocks an injected tag, a JSONP endpoint the policy already trusts smuggles code in, a reflected string executes, or an upload is sniffed and run as script.

Without it

  1. Attacker: Injects a script tag pointing at evil-cdn.com (via XSS, stored input, etc.)
  2. Site: Serves no CSP, so the source loads
  3. Browser: Runs the attacker's script
  4. Attacker: Also injects inline script to read the cookie
  5. Browser: Runs the inline script in the origin
  6. Attacker: Steals the session and acts as you
  7. Attacker: Finds a JSONP endpoint on a trusted origin
  8. Attacker: Puts attacker code in the callback parameter
  9. Server: Wraps the payload in the callback
  10. Attacker: Loads it via a whitelisted script tag
  11. Browser: Trusts the origin and runs the code
  12. Attacker: Attacker code runs with the page's privileges
  13. Attacker: Puts script in a URL parameter
  14. Site: Reflects the input into the page
  15. Browser: Ignores the deprecated filter
  16. Attacker: Runs its script in the origin
  17. Attacker: Uploads script disguised as a text file
  18. Site: Serves it with a loose Content-Type
  19. Browser: Sniffs the bytes as executable
  20. Attacker: Runs its script in the origin
  21. You: ❌ Their code runs with your privileges.

With Passkey Accounts™

  1. Attacker: Injects a script into the page (XSS, stored input, etc.)
  2. PA™: It lifts nothing reusable
  3. Attacker: Also injects inline script to read stored auth
  4. PA™: The keys are non-extractable
  5. Attacker: Finds a JSONP endpoint on a trusted origin
  6. PA™: No JSONP endpoint exists
  7. Attacker: Loads it via a whitelisted script tag
  8. PA™: That tag loads inert data
  9. Attacker: Puts script in a URL parameter
  10. PA™: Output is escaped
  11. PA™: The reflected string stays inert
  12. Attacker: Uploads script disguised as a text file
  13. PA™: Responses carry nosniff
  14. You: ✅ It runs, and it finds nothing to take.

Developed by Justin Sargent (opens in a new tab) and published through Soup or Cereal, LLC. Privacy policy · Terms.