Skip to content

fix(security): 2 improvements across 1 files#1454

Open
tomaioo wants to merge 1 commit intoSolaceLabs:mainfrom
tomaioo:fix/security/oauth-tokens-stored-in-localstorage-xss-
Open

fix(security): 2 improvements across 1 files#1454
tomaioo wants to merge 1 commit intoSolaceLabs:mainfrom
tomaioo:fix/security/oauth-tokens-stored-in-localstorage-xss-

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented Apr 25, 2026

Summary

fix(security): 2 improvements across 1 files

Problem

Severity: High | File: client/webui/frontend/src/auth/authCallback.tsx:L11

The auth callback stores access_token, sam_access_token, and refresh_token in localStorage. Any successful XSS in the application (or malicious third-party script execution) can read and exfiltrate these long-lived credentials, enabling account/session takeover.

Solution

Avoid storing bearer/refresh tokens in localStorage. Prefer secure, HttpOnly, SameSite cookies managed by the backend, or short-lived in-memory tokens with a hardened refresh flow. If browser storage is unavoidable, use sessionStorage, minimize token lifetime/scope, and enforce strong CSP + XSS defenses.

Changes

  • client/webui/frontend/src/auth/authCallback.tsx (modified)

- Security: OAuth tokens stored in localStorage (XSS-exfiltration risk)
- Security: OAuth callback does not validate `state`/anti-forgery parameter

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant