AIsaAIsaStudio English 打开 AIsa Studio

Parameter Labs 披露 ChatGPT HTML 预览沙箱逃逸漏洞,OpenAI 修复并支付 5000 美元赏金

原标题:How We Took Over ChatGPT Accounts

Parameter Labs 披露了针对 ChatGPT HTML 预览(旧称 Canvas)功能的一条复杂攻击链:沙箱 iframe 中的不可信代码可通过 postMessage() 触发 MathLive 库虚拟键盘的父页面消息处理代码,利用 innerHTML 注入无沙箱限制的新 iframe,再借助 YouTube oEmbed 端点绕过 CSP 获得 JavaScript 执行,最终窃取用户私有数据。结果是攻击者可构造一个 ChatGPT 分享链接,其他已登录用户访问时可被窃取隐私数据或代其执行操作。OpenAI 已修复漏洞并支付 5000 美元漏洞赏金,Simon Willison 认为对如此严重的漏洞而言赏金偏低。

为什么值得看

原文完整拆解了一条针对 ChatGPT 沙箱 iframe 的复杂攻击链,包括 MathLive 库、innerHTML 和 CSP 绕过细节,可作 Web 安全案例参考。

阅读原文 ↗

本页的摘要、推荐理由与解读出自 AIsa Studio 的 AI 风向智能体,原文版权归原作者所有。

原文

31st October 2026 - Link Blog

How We Took Over ChatGPT Accounts (via) Parameter Labs describe an exploit they found against ChatGPT's implementation of the artifacts pattern (OpenAI used to call this "Canvas" but it looks like the latest revision is called HTML previews), where interactive custom HTML apps are displayed in a sandboxed iframe.

It's important that HTML in these stays tightly sandboxed to avoid untrusted code interacting with OpenAI APIs and accessing private data.

Parameter found quite a complex attack chain. OpenAI use the MathLive JavaScript library as part of their graph support, and that library includes its own virtual keyboard, which can be triggered in the parent page via postMessage() from the sandboxed iframe.

That message receiving code uses innerHTML, so anything that sends a message can add custom HTML to the parent - and there was no mechanism to prevent other sandboxed frames, including HTML preview frames, from calling that method.

This meant untrusted code in an iframe could insert HTML, and while innerHTML doesn't directly execute script elements it could be used to inject a new iframe without sandbox restrictions.

OpenAI’s CSP rules blocked inline scripts entirely, and only allowed script loading from a handful of domains, but one of those was YouTube - and the YouTube oEmbed endpoint could be used to reflect JavaScript back in a way that executed it.

Once the attack had JavaScript execution on ChatGPT, it was trivial to fetch private user data from APIs and exfiltrate it via an image reference.

The end result: you could create a ChatGPT share URL which, when visited by another signed-in user, could exfiltrate their private data or take actions on their behalf.

OpenAI closed the hole and paid out a $5,000 bug bounty, which I think was a bit cheap for a vulnerability this serious.

原文版权归 Simon Willison 及原作者所有,本站转载仅供阅读。如需删除,请联系 support@aisa.one。