AI Security AI安全 8h ago Updated 2h ago 更新于 2小时前 49

Bing Images Flaws Let Crafted SVGs Run Commands as SYSTEM on Microsoft's Servers Bing图片漏洞允许定制SVG在微软服务器上以SYSTEM权限运行命令

Crafted SVG files submitted to Bing Images triggered critical OS command injection vulnerabilities, allowing arbitrary code execution as NT AUTHORITY\SYSTEM on Windows and root on Linux workers. The attack exploited ImageMagick’s delegate mechanism, where an SVG image reference containing a pipe character was interpreted as a shell command rather than a filename. Microsoft assigned two Critical severity CVEs (9.8 CVSS score) for the flaws: one via public upload and another via server-side URL fe 安全公司XBOW发现Bing图片搜索存在严重漏洞,允许攻击者通过构造的SVG文件在微软生产环境的图像处理器上以SYSTEM/root权限执行任意命令。 漏洞根源在于ImageMagick等图像处理库的“委托(delegate)”机制被错误启用,导致SVG中的XML引用被解析为系统shell命令而非普通数据。 微软已修复该问题并颁发两个CVSS评分9.8的严重CVE(CVE-2026-32194和CVE-2026-32191),无需用户端操作即可解决。 攻击路径分为两类:一是通过“按图搜图”上传功能直接注入SVG,二是利用反向搜索功能让服务器抓取远程托管的恶意SVG。 此次事件重演了2016年I

75
Hot 热度
65
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Crafted SVG files submitted to Bing Images triggered critical OS command injection vulnerabilities, allowing arbitrary code execution as NT AUTHORITY\SYSTEM on Windows and root on Linux workers.
  • The attack exploited ImageMagick’s delegate mechanism, where an SVG image reference containing a pipe character was interpreted as a shell command rather than a filename.
  • Microsoft assigned two Critical severity CVEs (9.8 CVSS score) for the flaws: one via public upload and another via server-side URL fetching (blind SSRF).
  • XBOW successfully demonstrated out-of-band command execution without authentication or user interaction, though Microsoft patched the issue server-side before public disclosure.
  • The incident highlights the persistent risk of treating image processing libraries as mere "plumbing" rather than part of the primary attack surface, echoing historical issues like ImageTragick.

Why It Matters

This vulnerability demonstrates how seemingly benign file formats like SVG can bypass application-level validation if underlying image processing libraries are misconfigured. For AI and software practitioners, it underscores the critical importance of securing third-party dependencies and configuring strict security policies for any component that processes untrusted input.

Technical Details

  • Vulnerability Mechanism: The flaw relied on ImageMagick's delegate system. When parsing an SVG, the renderer followed an image reference starting with a pipe (|), which invoked an external shell command instead of reading a file path.
  • Attack Vectors: Two distinct paths were identified:
    • CVE-2026-32194: Direct upload of a base64-encoded SVG via the /images/kblob endpoint.
    • CVE-2026-32191: Blind Server-Side Request Forgery (SSRF) where Bingbot fetched an attacker-controlled SVG URL via the imgurl parameter.
  • Privilege Escalation: The image processing workers executed commands with maximum privileges: uid=0/gid=0 on Linux and NT AUTHORITY\SYSTEM on Windows Server 2022 Datacenter.
  • Exploitation Method: XBOW used a one-pixel SVG payload to trigger the command injection and exfiltrate data via curl to an external collector, proving the vulnerability through out-of-band channels due to the blind nature of the SSRF.
  • Remediation: Microsoft fixed the issue server-side. Recommended mitigations include disabling delegates in policy.xml, restricting accepted formats (SVG, MVG, EPS), sandboxing workers, and blocking outbound network access from conversion services.

Industry Insight

  • Security Configuration Audits: Organizations must audit the configuration of image processing libraries (like ImageMagick, GraphicsMagick) to ensure delegates are disabled by default for untrusted inputs, adhering to the principle of least privilege.
  • Attack Surface Expansion: Developers should recognize that helper tools and parsers are part of the attack surface. Treating them as internal plumbing often leads to overlooked vulnerabilities that can result in full system compromise.
  • Network Segmentation: Implementing strict egress filtering for servers handling untrusted media is essential to prevent out-of-band data exfiltration and limit the impact of potential command injection flaws.

TL;DR

  • 安全公司XBOW发现Bing图片搜索存在严重漏洞,允许攻击者通过构造的SVG文件在微软生产环境的图像处理器上以SYSTEM/root权限执行任意命令。
  • 漏洞根源在于ImageMagick等图像处理库的“委托(delegate)”机制被错误启用,导致SVG中的XML引用被解析为系统shell命令而非普通数据。
  • 微软已修复该问题并颁发两个CVSS评分9.8的严重CVE(CVE-2026-32194和CVE-2026-32191),无需用户端操作即可解决。
  • 攻击路径分为两类:一是通过“按图搜图”上传功能直接注入SVG,二是利用反向搜索功能让服务器抓取远程托管的恶意SVG。
  • 此次事件重演了2016年ImageTragick漏洞的原理,警示开发者必须严格限制图像处理组件的网络访问和外部程序调用权限。

为什么值得看

这篇文章揭示了大型科技公司内部基础设施中因忽视“辅助组件”安全性而导致的严重远程代码执行风险,强调了将图像处理视为攻击面一部分的重要性。对于AI从业者和安全工程师而言,它提供了关于如何正确配置ImageMagick等工具、隔离不可信输入以及防御类似ImageTragick复现漏洞的具体技术指南。

技术解析

  • 漏洞原理:Bing后端使用ImageMagick处理图像,其默认配置启用了“委托(delegates)”,允许将不支持的格式交给外部程序处理。攻击者利用SVG是XML格式的特性,在其中插入以管道符|开头的图像引用,迫使渲染器将其作为shell命令执行,而非文件名。
  • 攻击向量
    • CVE-2026-32194 (CWE-77):通过“按图搜图”上传接口,将Base64编码的恶意SVG放入imageBin字段提交。
    • CVE-2026-32191 (CWE-78):通过反向搜索参数imgurl提供恶意SVG URL,利用bingbot/2.0爬虫抓取并送入相同的处理管线。两者均无需认证。
  • 权限提升与验证:测试结果显示,Linux worker返回uid=0 (root),Windows worker以NT AUTHORITY\SYSTEM运行,并拥有SeImpersonatePrivilege等高危权限。攻击者通过带外通道(Out-of-band)将命令输出curl回控服务器进行验证。
  • 修复与缓解建议
    • policy.xml中设置<policy domain="delegate" rights="none" pattern="*" />以禁用所有委托。
    • 限制接受的图像格式,拒绝SVG、MVG、EPS等包含解释器的格式。
    • 在沙箱中运行转换进程,降低权限,并阻断worker出站网络连接。

行业启示

  • 重构安全边界认知:应用程序常将图像转换库视为底层“管道”而非攻击面,但攻击者将其视为“解析器”。企业必须将第三方库的配置和安全策略纳入核心攻击面管理。
  • 最小权限原则至关重要:生产环境中的图像处理服务不应具备系统级权限或出站网络访问能力。即使漏洞存在,严格的网络隔离和权限限制也能阻止数据泄露和进一步渗透。
  • 历史教训的重复性:自2016年ImageTragick以来,同类漏洞反复出现。行业需要建立更严格的自动化测试和配置审计流程,确保在处理不可信用户上传内容时,默认配置处于最安全的“拒绝模式”。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Security 安全