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

[BUG] Stored XSS in template name #2745

Open
takyoni opened this issue Apr 13, 2022 · 1 comment
Open

[BUG] Stored XSS in template name #2745

takyoni opened this issue Apr 13, 2022 · 1 comment
Labels

Comments

@takyoni
Copy link

takyoni commented Apr 13, 2022

Describe the bug
It's possible to execute JS on application context by modifying the API query values when saving a template.

To Reproduce
Access to a new dashboard in graphite-web instance (i.e. http://localhost/dashboard). You don't really need data in it.
Use the "Save As Template " feature (In the context menu Dashboard > Save As Template ). Give it a name.
<img src=1 onerror=alert(1)>
String to replace
<img src=1 onerror=alert(1)>
Use the "Template finder" feature (In the context menu Dashboard > Template finder ). You can see XSS
Expected behavior
This can be solved by removing or ignoring requests containing the characters "<" ">" and/or other escaping/scripting characters. -> Sanitize the value before using it.

Screenshots
Снимок экрана (2040)
Снимок экрана (2041)
Снимок экрана (2042)
Снимок экрана (2044)
Снимок экрана (2043)

Environment (please complete the following information):

  • OS flavor: Debian 11
  • Graphite-web version 1.1.8
  • Setup type: docker
@deniszh
Copy link
Member

deniszh commented Nov 6, 2022

Fixed in #2785

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

No branches or pull requests

2 participants