InsertScript: Blink – DoS of tab via SVG in img tag / CSS context


This is just a quick blogpost to document a behavior in the Blink engine in regards to the processing of SVG images in the context of the HTML img tag, CSS or any context where SVG is treated as an “static” image. It allows SVG images to use inline XSLT stylesheets, which is crafted in such a way to cause a memory exhaustion of the tab viewing the page that includes the malicious SVG image. 

This can be used when someone either found a HTML injection or a CSS injection, which can not be exploited further, but allows to load a remote image. But in the end it is nothing major as often something similar can be achieved through other means. 

The origin 

Even back then I had to use the WayBack machine to access the linked expensive_xsl_svg.html file to see what SVG file is loaded.

Loaded SVG:

This is basically the reason why I decided to write a blogpost to document this behavior again. I also have found that not everyone is aware of this behavior. 

The issue

Well examples are better than words:

Dos via tag:

wait for the tab to crash - this depends on your system

DoS via CSS background-image example:

wait for the tab to crash - this depends on your system

Content of dos.svg

 

 id ID #REQUIRED

>

]>

 

 

 

 

 

 

 

 

 

 

 

 

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">