In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.
Start learningUpgrade cheerio
to version 0.9.0 or greater.
cheerio
is an implementation of core jQuery designed specifically for the server. Affected versions of this package are vulnerable to Cross-site Scripting (XSS) attacks via assigned attributes.
The vulnerability was reported by Ben Atkin
When assigning attributes, there is no protection against XSS:
function xss() {
var $ = require('cheerio').load('<a>GitHub</a>');
$('a').attr('href', 'http://github.com/"><script>alert("XSS!")</script><br');
return $.html();
}
xss() returns:
<a href = "http://github.com/"><script>alert("XSS!")</script><br">GitHub</a>
<>