Cross Site Scripting in URI Security Vulnerability

Description
This script is possibly vulnerable to Cross Site Scripting (XSS) attacks.  Cross site scripting (also referred to as XSS) is a vulnerability that allows an attacker to send malicious code (usually in the form of Javascript) to another user.  Because a browser cannot know if the script should be trusted or not, it will execute the script in the user context allowing the attacker to access any cookies or session tokens retained by the browser.

This XSS variant usually appears when a PHP script is using one of following variables without filtering them:

  • PHP_SELF
  • REQUEST_URI
  • SCRIPT_URL
  • SCRIPT_URI

Those variables are set either by Apache or the PHP engine. Apache is automatically ignoring anything in the URI after the .php extension for mapping script filename, but these variables are containing the full URI.

Impact
Malicious users may inject JavaScript, VBScript, ActiveX, HTML or Flash into a vulnerable application to fool a user in order to gather data from them.An attacker can steal the session cookie and take over the account, impersonating the user.  It is also possible to modify the content of the page presented to the user.

References
XSS Woes
Acunetix Cross Site Scripting Attack
OWASP PHP Top 5

Acunetix Web Application Security Blog

Latest Article

Web Server Security and Database Server Security

Latest Whitepaper

Why File Upload Forms are a major security threat

Testimonials

“The issues detected were of major impact; if hackers would have found the security holes, they could have hacked an entire Joomla! Site.”

Robin Muilvijk
Quality & Testing Team, Joomla!