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

[Security] Stored XSS in account name #52

Closed
edoardottt opened this issue Feb 19, 2023 · 4 comments
Closed

[Security] Stored XSS in account name #52

edoardottt opened this issue Feb 19, 2023 · 4 comments

Comments

@edoardottt
Copy link

Tested version: b80b09d (latest)

Steps to reproduce the vulnerability:

  • Login in the application.
  • Click on user profile picture in the right corner below.
  • Click My Account
  • Set "><img src=x onerror=alert(document.domain)> as account name and save.
  • XSS fires.
  • Each time a target will visit the dashboard the payload will fire, even if the target is not logged in! In order to test this, just click logout and reload the page.

poc1

poc2

@Gera-IC
Copy link
Contributor

Gera-IC commented Feb 19, 2023

Thank you, I already fixed it in my own adding .removeTags(); but I think there are better ways as ui-bind, validator, etc.. this is the easy fix. :)

Captura de pantalla 2023-02-19 a las 20 00 53

@edoardottt
Copy link
Author

edoardottt commented Feb 19, 2023

don't rely on these naive solutions, there are specific libraries to sanitize input. you can use symbols in input fields but simply they will be rendered as pure text and not html.

@Gera-IC
Copy link
Contributor

Gera-IC commented Feb 19, 2023

You right. Thank you so much... im trying different solutions thanks to your observation... :)

@petersirka
Copy link
Collaborator

@edoardottt fixed b6a128a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants