The authentication navbar and profile dropdown currently use unsafe HTML rendering for user data (name and email). This creates a potential DOM-based XSS vulnerability if malicious data is stored in localStorage.
User-controlled values are directly inserted into the UI, which could allow execution of injected scripts.
Steps to Reproduce
- Register or modify a user object in localStorage
- Inject HTML or script-like content into the name or email field
- Open the application navbar/profile dropdown
- Observe unsafe rendering behavior
Expected Behavior
User data should be displayed as plain text and not interpreted as HTML.
Actual Behavior
User data is rendered using unsafe HTML methods, creating a potential XSS risk.
Security Impact
- DOM-based XSS risk in authentication UI
- Potential execution of injected scripts from stored user data
Priority
High (Security Issue)
The authentication navbar and profile dropdown currently use unsafe HTML rendering for user data (name and email). This creates a potential DOM-based XSS vulnerability if malicious data is stored in localStorage.
User-controlled values are directly inserted into the UI, which could allow execution of injected scripts.
Steps to Reproduce
Expected Behavior
User data should be displayed as plain text and not interpreted as HTML.
Actual Behavior
User data is rendered using unsafe HTML methods, creating a potential XSS risk.
Security Impact
Priority
High (Security Issue)