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

[Vulnerbability]: XSS Cross Site Scripting #15

Closed
ZoneTwelve opened this issue May 28, 2023 · 5 comments
Closed

[Vulnerbability]: XSS Cross Site Scripting #15

ZoneTwelve opened this issue May 28, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@ZoneTwelve
Copy link

Description of the bug

Based on the code, I saw the rendering method is using String Template literals to process the color user just gives.

Exploit
Screenshot Exploit

Prove of Concept
Screenshot PoC

Steps To Reproduce

  1. write the XSS in the parameter, ex. color, strokeWeight, etc...
  2. execute the site you are running.
  3. got the alert popup

Additional Information

No response

@ZoneTwelve ZoneTwelve added the bug Something isn't working label May 28, 2023
@shinokada
Copy link
Owner

shinokada commented May 28, 2023

Your color prop quote has " and '.

image

It should be:

<Eye size="50" color='red' />

@ZoneTwelve
Copy link
Author

Thank you for the response.
But I think you missing understanding the purpose of the following code
if we got users who don't understand how the code work.
that might cause a Cross-Site-Scripting (XSS) in the arguments rendering process.
In my thought, you should replace the String Template Iteration with another safer method.

@shinokada
Copy link
Owner

Thank you for the clarification. I appreciate it, and I will see what I can do to address the issue.

@shinokada
Copy link
Owner

shinokada commented May 28, 2023

Can you check with svelte-heros-v2@0.5.1 and let me know if it solves this issue?

@ZoneTwelve
Copy link
Author

Hello shinokada, I received your message, and I have written a Proof of Concept for your project svelte-heros-v2-vuln-PoC.
If you want to try it yourself using the previous vulnerability, you can follow the instructions provided in my README.

I'm confident that, at the very least, it will no longer be able to execute my payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants