openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Security: Session token persisted unencrypted in localStorage (userScopedStorage.ts)

Open Liohtml opened this issue 6 months ago • 0 comments

Summary

app/src/store/userScopedStorage.ts persists the entire Redux blob — including sessionToken and authentication state — in localStorage with no encryption, no integrity check, and no expiry. Keyed by ${userId}:persist:*.

Impact

Medium — On shared machines or in any XSS scenario, the full persisted state is readable in plaintext.

Suggested Fix

  1. Exclude sessionToken from the redux-persist whitelist (re-fetch from Rust core on each boot)
  2. Or encrypt the persist blob with a key derived from the user's device credentials

Liohtml avatar May 16 '26 14:05 Liohtml