Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(security): Security Fix for HTML injection to Stored XSS - huntr.dev #4443

Closed
wants to merge 3 commits into from

Conversation

huntr-helper
Copy link

https://huntr.dev/users/Mik317 has fixed the HTML injection to Stored XSS vulnerability 🔨. Mik317 has been awarded $25 for fixing the vulnerability through the huntr bug bounty program 💵. Think you could fix a vulnerability like this?

Get involved at https://huntr.dev/

Q | A
Version Affected | ALL
Bug Fix | YES
Original Pull Request | 418sec#1
Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/other/monica/1/README.md

User Comments:

Bounty URL: https://www.huntr.dev/bounties/1-other-monica/

⚙️ Description *

The monica CMS is vulnerable against stored-XSS which occurred when creating a new journal which was then shown
😄

💻 Technical Description *

I added a server-side strict check to html encode in entities every HTML tag which is inserted inside the post body aka entry. I used the htmlentities() to accomplish this task, and I modified also the edit action in order to avoid bypasses 😄

🐛 Proof of Concept (PoC) *

  1. Install the CMS and start the server
  2. Go on http://127.0.0.1:8000/journal and click the Add a journal entry button
  3. Add as title and content the following value: <img src="x" onerror=alert(1)>
  4. Save
  5. An XSS is popped in the Journal list page

Screenshot from 2020-09-10 00-57-48

🔥 Proof of Fix (PoF) *

Same steps with fixed version:

Screenshot from 2020-09-10 00-59-22

👍 User Acceptance Testing (UAT)

All OK and tested for bypasses 👍

@CLAassistant
Copy link

CLAassistant commented Sep 11, 2020

CLA assistant check
All committers have signed the CLA.

@asbiin asbiin changed the title Security Fix for HTML injection to Stored XSS - huntr.dev fix(security): Security Fix for HTML injection to Stored XSS - huntr.dev Sep 12, 2020
@asbiin
Copy link
Member

asbiin commented Sep 12, 2020

Thank you @Mik317
However, I will that another way, because it can affect current data.

@asbiin asbiin closed this Sep 12, 2020
@asbiin
Copy link
Member

asbiin commented Sep 12, 2020

Superseeded by #4451

@github-actions
Copy link

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants