RSS Injection in Sage part 2

2 months ago, both pdp any myself released a vulnerability “Cross Context Scripting in Sage”. This issue was resolved in Sage release 1.3.7 (see: http://mozdev.org/bugs/show_bug.cgi?id=15101). I found a new vulnerability which affects the latest version, Sage 1.3.8. In addition to the XSS vulnerability, it should be noted (as in the previous vulnerability) that this issue occurs within the Local Browser Context.
Background:
A number of popular online RSS readers allow images to be embedded within Feeds. It has been known for some time now, that the amount of people subscribed to your feed can be determined by using the image src functionality. This is interesting from an anonymity point of view. I was curious to know just how well these applications would prevent and/or restrict the “img onload” features.
Ironically, Sage seems to handle this quite well. It removes any “onload” attribute within an IMG element. Sage also completely removes offending JavaScript code. However, it fails to remove the script tags when inserted within the IMG element. In addition to this, it will actually end the IMG element for us. For example:
<img src=”http://michaeldaw.org/images/jss.jpg” <script>alert(’blah’);</script> ></img>
becomes:
<img src=”http://michaeldaw.org/images/jss.jpg” > <script>alert(’blah’);</script> </img>
Notice the trailing > is removed and added before our JavaScript code.
A proof of concept feed can be found here.
This feed will open “/etc/passwd” for Linux users and “…./etc/hosts” for MS Windows users. Please note I have not tested the Windows feed.
that’s awesome work. :)
I tested the Windows feed, it works. But you must correct a minor error list below.
Error
missing ) after argument list
Source
req.send(null); alert(req.responseText } catch (e) {};
And moreover, I also find Sage do nothing with the example code:
alert(’blah’); >My Sage XSS Vulnerability.
but the demo still works.
I use Windows XP SP2 and Firefox 2.0 ,Sage 1.3.8
Sage p0wn3d (again)! :-)
I too cannot get the alert(’blah’) to work. Any ideas?
Rick, thanks for checking that. I have corrected the missing ). I have also included an alert(’blah’) into the Windows exploit.
Was this vulnerability reported to the Sage authors?
Mike, an email was sent to Peter Andrews - Project Lead, Developer.
[…] Update: dwk found another RSS XSS vuln on the latest version of Sage (1.3.8 at time of writing). Additionally, Rick also found another RSS XSS vuln on the latest version. […]
Thanks for bringing this to light David. Bug filed:
http://mozdev.org/bugs/show_bug.cgi?id=15767
A maintenance release will follow shortly.
Sage 1.3.9 has been released to address this and other issues:
http://sage.mozdev.org/blog/archives/2006/11/sage_1_3_9_released.html
[…] vulnerability in Firebug - we have seen previous vulnerabilities in Firefox plugins including the Sage RSS reader exploits myself and pdp exploited in the past. The awesome concept here was using Mozilla code to load executables files. […]
Hi.
Good design, who make it?