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

Reflected Cross Site Scripting in /vulnerabilities/xss.js #1

Closed
ghost opened this issue Apr 23, 2020 · 0 comments
Closed

Reflected Cross Site Scripting in /vulnerabilities/xss.js #1

ghost opened this issue Apr 23, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 23, 2020

Reflected Cross Site Scripting in /vulnerabilities/xss.js high severity

Fixability: we don't have available fix now
Overview:
Found reflected xss, in the sink function res.send
The parameter req.query.name is most likely controlled by users and can be injected by exploits like this:-
req.query.name = <script>alert(document.cookie)</script>
req.query.name = <img src=/ onerror=alert(document.cookie)

Fix

  1. Validate user parameter req.query.name in line 4 to be safe from javascript code that used by function res.send.
    router.get('/greeting', (req, res) => {res.send('<h1> Hello :'+ req.query.name +"</h1>")})

refrence id: 253715876755738992
What do you want me to do next?
details@shieldfy details
ignore@shieldfy ignore ?

@ghost ghost closed this as completed Apr 23, 2020
This issue was closed.
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

0 participants