PHP 5.1.6、4.4.4 及更早版本中,htmlspecialchars() 與 htmlentities() 在處理 UTF-8 編碼時存在潛在緩衝區溢位漏洞,攻擊者可能利用此漏洞繞過編碼並注入惡意代碼(如 eval() 注入)。
htmlspecialchars()
htmlentities()
eval()
htmlspecialchars/htmlentities
mb_convert_encoding
完整漏洞詳情可參閱官方安全公告:PHP 5.2.0 Release Announcement。