Skip to content

CRITICAL: Credentials stored in localStorage #72

@CPAtoCybersecurity

Description

@CPAtoCybersecurity

Security Finding

Severity: CRITICAL
Location: src/utils/confluenceSync.js:25-49
CWE: CWE-922 (Insecure Storage of Sensitive Information)

Description

Confluence API credentials and entry mappings are stored in localStorage, which is:

  • Accessible via XSS attacks
  • Not protected by HttpOnly flag
  • Not encrypted
  • Readable by any JavaScript on the page

Current Code

export function saveEntryIdMappings(mappings) {
  entryIdMappings = { ...entryIdMappings, ...mappings };
  localStorage.setItem('confluence-entry-mappings', JSON.stringify(entryIdMappings));
}

Recommended Fix

  1. Move credential storage to server-side sessions
  2. Use httpOnly, Secure, SameSite cookies for session tokens
  3. Never store tokens client-side in localStorage
  4. Implement proper backend authentication

References


Found by Arcanum sec-context security review

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions