Abusing docmode inheritance: EasyXDM 2.4.19 DOMXSS
EasyXDM 2.4.19 contains a DOM-based XSS that only triggers in old Internet Explorer document modes, where a name-property bug causes a frame element to be created with an attacker-controlled name that is parsed as markup. By using document mode inheritance through a message/rfc822 document, an attacker could make all IE11 users reach the vulnerable code without them manually switching to an old mode.
The original lives on mksben.l0.cm
We do not hold its text, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the library passed an attacker-controlled channel name into document.createElement in a code path only reached when a browser feature test (HAS_NAME_PROPERTY_BUG) was true, so the string was interpreted as markup rather than a plain name.
Impact
Script execution was limited to Internet Explorer in old document modes, but the message/rfc822 inheritance trick could expose all IE11 users without them changing any settings.
What the attacker needed
Victim uses Internet Explorer; victim opens attacker page; page served as message/rfc822
The fix
It was fixed in EasyXDM 2.4.20, and users should update.
How it was found
- Open the vulnerable EasyXDM test page in Internet Explorer.
- Switch the page to IE7 mode using the F12 Developer Tools emulation tab.
- Load the page with a crafted xdm_c parameter containing an event handler.
- Observe the alert dialog showing the document domain.
- To reach all IE11 users, serve the page as a message/rfc822 document so its document mode is inherited down to IE7.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
EasyXDM is a library that helps web pages talk to each other through iframes. In old versions of Internet Explorer, a quirk meant the library built an iframe using a name value supplied by the page's URL, and that value could contain HTML that the browser then ran as a script. The author found a way to force modern IE11 into the old behaviour, so more users were exposed than first appeared.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.