Bing Images Security Flaw Allows Hackers to Run Malicious Code Through SVG Files
A security researcher discovered a critical vulnerability in Microsoft Bing's image search that allowed arbitrary command execution on production servers. By uploading a specially crafted SVG file, the attacker could execute commands with the highest possible privileges: as NT AUTHORITY\SYSTEM on Windows servers and as root on Linux machines. The vulnerability existed across multiple workers in different hosts and network ranges, indicating a systemic flaw in Bing's image processing infrastructure rather than an isolated misconfiguration. Microsoft assigned two critical CVEs with scores of 9.8 out of 10, fixed the issues server-side before public disclosure, and reported no evidence of exploitation in the wild.
The root cause was a dangerous interaction between image processing libraries and shell command execution. When Bing's reverse image search fetched user-supplied URLs, the backend processed them through ImageMagick or a compatible conversion tool. SVG files, being XML-based rather than pixel data, can reference external images that the renderer attempts to fetch. The vulnerability arose because ImageMagick's delegate feature, which hands certain file formats to external programs through a shell, remained enabled on the production servers. By crafting an SVG with an image reference beginning with a pipe character, the attacker could inject shell commands that the server would execute instead of treating the input as a filename.
The security researcher from XBOW discovered the flaw through methodical probing of Bing's image processing pipeline. While the reverse image search feature appeared to be a blind server-side request forgery with no output returned to the client, error messages revealed that backend workers were parsing fetched content. The researcher tested various ImageMagick pseudo-protocols and eventually identified that SVG image references could reach the dangerous delegate layer. The exploit payload consisted of a one-pixel SVG file whose image reference executed a command on the worker and sent the output to an external server under the researcher's control, confirming full system access.
This incident highlights a recurring security pattern where image processing tools are overlooked as potential attack surfaces. The 2016 ImageTragick vulnerability demonstrated the same class of delegate command injection flaw, yet similar issues continue to appear because organizations treat image conversion libraries as simple utility functions rather than parsers handling untrusted input. Microsoft's production environment violated multiple security principles: workers ran with excessive privileges, had direct internet access, and processed untrusted files with dangerous features enabled. The proper mitigation requires explicitly denying delegates in ImageMagick's policy configuration, validating and restricting input file formats, running workers with minimal privileges in sandboxed environments without internet access, and treating all image processing components as part of the application's attack surface.
Stay secure — stay Wavasec. 🔐