I need to work on an old web application left by a previous developer. It uses addlashes () to prevent XSS over the HTTML attribute.
Here is an example:
<?php // all $_POST vars are put through addslashes() echo "<input type='hidden' value='" . $_POST['id'] . "' />"; ?>
Is it vulnerable to XSS? Is there a javascript method that can be run in the value attribute, for example, in the src attribute, for example, src = 'javascript: alert (99)'. Or can the value attribute be broken, and then script tags can be inserted?
Edit: Thanks to Quentin, I find him vulnerable.
source share