Skip to content

Conversation

DefenderK
Copy link
Owner

No description provided.

@DefenderK
Copy link
Owner Author

DefenderK commented May 16, 2025

Snyk checks have failed. 2 issues have been found so far.

Icon Severity Issues
Critical 0
High 2
Medium 0
Low 0

security/snyk check is complete. 1 issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

code/snyk check is complete. 1 issues have been found. (View Details)

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.


exports.vulnerable_xss_reflected = function (req, res) {
const userInput = req.query.name;
res.send(`<h1>Hello ${userInput}</h1>`);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Cross-site Scripting (XSS)

Unsanitized input from an HTTP parameter flows into send, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).

Line 326 | CWE-79 | Priority score 806 | Learn more about this vulnerability
Data flow: 8 steps

Step 1 - 5

const userInput = req.query.name;

Step 6 - 8

res.send(`<h1>Hello ${userInput}</h1>`);

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

Successfully merging this pull request may close these issues.

1 participant