Skip to content
RCE Write-up Advanced

How a Single SVG File Almost Handed Hackers Microsoft’s Servers

Bing's public 'Search by Image' upload feature passed user-supplied SVG files to an ImageMagick-style rendering engine whose delegate features executed pipe-prefixed commands inside the SVG as operating system commands. An attacker could therefore run commands as SYSTEM on Windows or root on Linux on Microsoft's production servers.

xpert4cyber Follow

Published on medium.com

No phishing. No malware.

Xpert4Cyber, on medium.com

The full write-up lives on its author's site

It belongs to its author, 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

The image rendering engine's delegate feature allowed a pipe-prefixed command embedded in an SVG to be executed as an OS command rather than being treated as image data.

Impact

An attacker could achieve command execution as NT AUTHORITY\SYSTEM on Windows and root on Linux across multiple hosts in Microsoft's fleet; the flaws have since been patched server-side.

What the attacker needed

No login required; upload an SVG via Search by Image

The fix

The flaws were fixed server-side by Microsoft.

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.

An SVG is a picture format that is really a text document, and it can tell software to fetch or run other things. Bing's image converter trusted those instructions and ran them as commands on the server. That let an outsider take control of the machine just by uploading a file, without any login.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by xpert4cyber

View all

11 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.