-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Possibility of Reflected Cross-Site Scripting (XSS) attack is detected by static code analysis #1476
Comments
Adds a unit test and a fuzz test to demonstrate that the AtomicLevel handler is not vulnerable to XSS. I ran the fuzz test on my computer for 10 minutes on my laptop with no cases where `<...>` was present in the response body. ``` ... fuzz: elapsed: 9m57s, execs: 43145040 (95839/sec), new interesting: 442 (total: 445) fuzz: elapsed: 10m0s, execs: 43396113 (83690/sec), new interesting: 442 (total: 445) ``` Resolves #1476
Thanks for reporting, @visheshtanksale. I believe that this is a false positive in the static analysis tool. decodePutRequest decodes the JSON blob. It produces a level out to the response body if and only if it's a recognized level. All other values result in error. The original input is reproduced to the user only with escaping (e.g. encoding/json's HTML escaper). I do not believe it's possible to produce arbitrary HTML on the page through this means. If you think this is incorrect, please provide more details on how to reproduce this. |
Adds a unit test and a fuzz test to demonstrate that the AtomicLevel handler is not vulnerable to XSS. I ran the fuzz test on my computer for 10 minutes on my laptop with no cases where `<...>` was present in the response body. ``` ... fuzz: elapsed: 9m57s, execs: 43145040 (95839/sec), new interesting: 442 (total: 445) fuzz: elapsed: 10m0s, execs: 43396113 (83690/sec), new interesting: 442 (total: 445) ``` Refs #1476
Closing this issue as demonstrated by #1477. Please feel free to reopen if you disagree. |
Describe the bug
The attacker would be able to alter the returned web page by simply providing modified data in the user input Body, which is read by the decodePutRequest method here. This input then flows through the code straight to the output web page, without sanitization.
To Reproduce
Steps to reproduce the behavior
Expected behavior
The input should be validated
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: