graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.88k stars 1.26k forks source link

[BUG] Reflected XSS #2779

Open discodamone opened 1 year ago

discodamone commented 1 year ago

I would have reported this privately but there is no security policy for this repo.

Describe the bug Reflected XSS at /render/?cacheTimeout=<img%20src=x%20onerror=alert(document.domain)> due to an error message that doesn't sanitize the output when cacheTimeout is not an integer.

To Reproduce Run the server, visit /render/?cacheTimeout=<img%20src=x%20onerror=alert(document.domain)>

Expected behavior Output the error with no HTML tags allowed

Environment (please complete the following information): I ran docker with graphite 1.10.0

deniszh commented 1 year ago

Looks like fixed in #2782