<span class="gmail_quote"><br></span><div><span style="font-weight: bold;">[-] Produit </span> : KorviBlog<br><br><span style="font-weight: bold;">[-] Langage </span> : PHP<br><br><span style="font-weight: bold;">
[-] Site web officiel
</span> : <a href="http://korvi.jdhosts.net/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://korvi.jdhosts.net/</a><br><br style="font-weight: bold;"><span style="font-weight: bold;">
[-] Page vulnérable </span> : livre_or.php <br><br style="font-weight: bold;">
<span style="font-weight: bold;">[-] Faille de sécurité </span> : Cross Site Scripting Permanent <br><br style="font-weight: bold;"><span style="font-weight: bold;">[-] Explications </span> : <br><br>
<div style="text-align: center;"> Ligne 4 : livre_or($_POST['prenom'], $_POST['emailFrom'], $_POST['body'], time());<br><br> Les variables $_POST['prenom'] , $_POST['emailFrom'] et $_POST['body'] ne sont pas correctement filtrées avant leur affichage, ce qui permet l'injection de code malicieux via le formulaire de cette page.
<br></div><span style="font-weight: bold;"> </span><br style="font-weight: bold;"><span style="font-weight: bold;">[C]orrection :</span> <br><br><div style="text-align: center;"> Pour corriger le problème, il suffit d'appliquer la fonction htmlentities() à ces trois variables :
<br><br> livre_or( htmlentities($_POST['prenom']), htmlentities($_POST['emailFrom']), htmlentities($_POST['body']), time()); <br></div><br><span style="font-weight: bold;">[R]emarque : </span><br><br><div style="text-align: center;">
Aucune verification des données entrées n'est faite, en laissant par exemple les champs prénom email message vides le message est posté.<br></div></div><div><span class="sg"><br style="font-weight: bold;">
<span style="font-weight: bold;">
[C]redit :</span> cdg393
</span></div>