Description
The CodeIgniter framework contains a function, xss_clean(), which is intended to filter out potential XSS attacks. The xss_clean() function would only strip attributes from HTML tags that were properly closed. However, browsers which see unclosed tags can choose to parse them as though they were properly formed. For example:
<img src="a" onerror='eval(atob("cHJvbXB0KDEpOw=="))'The lack of a > at the end meant that the onerror attribute wasn`t stripped by xss_clean(). However, browsers would parse this input as a valid img tag with src and onerror attributes.
Remediation
Upgrade to the latest version of CodeIgniter (this problem was fixed in version 2.1.4).
References
Related Vulnerabilities
WordPress Plugin Mongoose Page Cross-Site Scripting (1.8.3)
WordPress Plugin FCChat Widget 'path' Parameter Cross-Site Scripting (2.1.7)
WordPress Plugin Limit Login Attempts Reloaded Cross-Site Scripting (2.7.0)
WordPress Plugin WP Custom Fields Search Cross-Site Scripting (0.3.28)
WordPress Plugin WP-Live Chat by 3CX Cross-Site Scripting (6.2.01)