If at first you don't succeed; call it version 1.0
Wednesday, 14 May 2008


Internet Explorer is prone to a Cross-Zone Scripting vulnerability in its “Print Table of Links” feature. This feature allows users to add to a printed web page an appendix which contains a table of all the links in that webpage.

An attacker can easily add a specially crafted link to a webpage (e.g. at his own website, comments in blogs, social networks, Wikipedia, etc.), so whenever a user will print this webpage with this feature enabled, the attacker will be able to run arbitrary code on the user’s machine (i.e. in order to take control over the machine).

Affected version

Internet Explorer 7.0 and 8.0b on a fully patched Windows XP.

Windows Vista with UAC enabled is partially affected (Information Leakage only).

Earlier versions of Internet Explorer may also be affected.

Technical details

Whenever a user prints a page, Internet Explorer uses a local resource script which generates an new HTML to be printed. This HTML consists of the following elements: Header, webpage body, Footer, and if enabled, also the table of links in the webpage.

While the script takes only the text within the link’s inner data, it does not validate the URL of links, and add it to the HTML as it is. This allows to inject a script that will be executed when the new HTML will be generated.

As I said in a previous post, most of the local resources in Internet Explorer are now running in Internet Zone. Unfortunately, the printing local resource script is running in Local Machine Zone, which means that any injected script can execute arbitrary code on the user’s machine.


Proof of Concept

The following is an example of a URL which executes Windows Calculator:

http://www.google.com/?q=<script defer>new ActiveXObject(“Wscript.Shell”).run(“calc”)</script>


I removed the proof-of-concept of the 0day treasure hunt. A live proof-of-concept can be found at milw0rm.

Solution / Suggestion

I’ve contacted Microsoft last Tuesday. Their last response was that they are looking at an appropriate fix.

Until a patch is available, I suggest not to use the “print table of links” feature when printing a webpage.

Wednesday, 14 May 2008 13:12:52 UTC | Comments [8] | Security#
Wednesday, 14 May 2008 18:33:28 UTC
it's disabled by default
Wednesday, 14 May 2008 22:51:23 UTC
Well, the "print table of links" feature is marked off by default (IE7+IE8b).. so to exploit this issue, a user must visit a maliciously crafted page or a trusted site with content injected by an attacker (XSS/SQL inj'), prompt to print the and manually mark "print table of links" on...

No question this vulnerability severity is high, but the exploitation probability is very low.

Nice find.
Friday, 16 May 2008 18:12:19 UTC
Note, in Vista, the user is asked for permission first. This is still an issue, so don't get me wrong. Just want to make sure it is known that Vista protects the user in this case.
Friday, 16 May 2008 18:30:57 UTC
yet another reason to keep UAC enabled :-)
Saturday, 17 May 2008 00:58:39 UTC
Very cool, thx for sharing this
Saturday, 17 May 2008 22:14:21 UTC
I unfortunately havent got a printer right now to test, as a consequence the html is sent to MS Office One Note. But, even if the exploit triggers corretly, you CANNOT instantiate the Wscript.Shell Activex control, even in the local machine zone. (you will get an activex warning). ah and what about local machine zone lockdown feature?...I suppose this is not applied to this local resource script and that this particular script engine permits you to instantiate unsafe activex such as Wscript.Shell.
anyways thank you for this one, it gave me a light to improve a particular issue I found out months ago. (still works :P )
Friday, 19 September 2008 01:56:13 UTC
using IE8b2 with XP SP3, there is no calc executed, perhaps it is fixed in the IE8b2 ?
Friday, 26 December 2008 19:36:55 UTC
Print me with table of links to execute calc.exe

Comments are closed.     
Send me an Email
Follow me on Twitter
RSS Feeds
Admin Login
Sign In
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.