- Original Message --------
Subject: XSS in when combined with faked strip item markers
Date: Sat, 17 Mar 2012 23:04:30 -0300
From: Bawolff Bawolff <bawolff@gmail.com>
To: security <security@wikimedia.org>
I saw r113981, and it made me wonder what sort of mischief someone
could get up to if they forged strip item markers. Anyhow, create a
page containing only the following:
<nowiki>','',''); alert("XSS",')</nowiki>
{{#tag:charinsert|{{padleft:|21|<nowiki/>}}-nowiki-00000002-QINU}}
This creates a link on the page, which one clicked, arbitrary js is
executed. Note this is slightly probabilistic, depending on how big a
number Parser::getRandomString() returns. Most of the time (I'd
estimate ~75%) it works. if it doesn't the first time, hit preview
again. Using more complex parser functions, one could probably make
code that works 99.9% of the time.
The link is ugly such that most users would probably not click on it,
but I imagine you could use css to make "clicking" on the link seem to
be a legitimate thing to do.
This particular issue could be fixed by doing $data =
$parser->mStripState->unstripBoth( $data ); from the charinsert
extension. However I'm concerned there may be similar issues with
other extensions
Thanks,
Bawolff
Version: unspecified
Severity: normal