Escape HTML, JS and CSS output



TL;DR: Untrusted data that is sent down to the browser might get executed instead of just being displayed, this is commonly being referred as a cross-site-scripting (XSS) attack. Mitigate this by using dedicated libraries that explicitly mark the data as pure content that should never get executed (i.e. encoding, escaping)
Otherwise: An attacker might store a malicious JavaScript code in your DB which will then be sent as-is to the poor clients

Comments

Popular Posts