Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
XSS - SIP parameter #3
Line 56 of index.php sends unvalidated data to a web browser, which can result in the browser executing malicious code.
Cross-site scripting (XSS) vulnerabilities occur when:
In this case the data is sent at builtin_echo() in securityonion-capme/capme/index.php at line 56.
Example 1: The following PHP code segment reads an employee ID, eid, from an HTTP request and displays it to the user.
The code in this example operates correctly if eid contains only standard alphanumeric text. If eid has a value that includes meta-characters or source code, then the code will be executed by the web browser as it displays the HTTP response.
Initially this might not appear to be much of a vulnerability. After all, why would someone enter a URL that causes malicious code to run on their own computer? The real danger is that an attacker will create the malicious URL, then use e-mail or social engineering tricks to lure victims into visiting a link to the URL. When victims click the link, they unwittingly reflect the malicious content through the vulnerable web application back to their own computers. This mechanism of exploiting vulnerable web applications is known as Reflected XSS.
Example 2: The following PHP code segment queries a database for an employee with a given ID and prints the corresponding employee's name.
As the examples demonstrate, XSS vulnerabilities are caused by code that includes unvalidated data in an HTTP response. There are three vectors by which an XSS attack can reach a victim:
referenced this issue
Feb 8, 2016
added a commit
Feb 8, 2016
Please take a look at the updated file:
Please let me know what you think.