DemocracyLab / DemocracyLab/CivicTechExchange

Stored Cross-Site Scripting (XSS) in the Profile Page

Open
#1,026 2 comments 0 reactions 1 assignee Claimed by @maithili20 View on GitHub
bug
Dominant language
JavaScript
Stars
105
Forks
71
PR merge metrics
No merged PRs in 30d

Description

There is a Cross-Site Scripting (XSS) vulnerability with medium-high severity in the Profile page.

**Reproduction Steps:**
1. Change bio of your profile to alert(1) and save.
2. Allow a few minutes for changes to reflect.
3. Refresh the login page and observe that the alert box pops up.
It is stored XSS with medium-severity because it is self-XSS. More testing would be needed to be done to determine full impact.

**Cause:**
unescapeHtml function at common/components/utils/utils.js. This function is used at common/components/componentsBySection/AboutUs/BioModal.jsx for displaying bio. It uses inner html and doesn't do output encoding.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.