In brief: A Reddit post has published a cross-site scripting (XSS) flaw found on the website of security company Kaspersky.
The XSS flaws allow client-side script to be injected into web pages and can be used to bypass access controls. They were the most common form of web application vulnerabilities and most were simple to detect.'
The Reddit user had injected an image and a series of popups into the page.
XSS was rated as the second most pressing web application vulnerability in the Open Web Application Security Project Top Ten.
To mitigate XSS, the project recommended to keep untrusted data separate from active browser content.
- Positive or 'whitelist' input validation is also recommended as it helps protect against XSS, but is not a complete defense as many applications must accept special characters. Such validation should decode any encoded input, and then validate the length, characters, and format on that data before accepting the input.
- Consider employing Mozilla’s Content Security Policy.