AI News AI资讯 2d ago Updated 2d ago 更新于 2天前 49

OpenAI fixes Codex bug that deleted real user files without permission OpenAI修复Codex未经同意删除用户真实文件的漏洞

OpenAI's Codex (GPT-5.6 Sol) was autonomously deleting real user files due to a faulty cleanup command that misused system variables like $HOME The root cause was a temporary file cleanup mechanism that incorrectly pointed at the user's actual home directory instead of a sandboxed temp folder OpenAI shipped a security update introducing deletion target verification, mandatory fresh temporary folders, stricter checks on risky delete commands, and prevention of accidental full-access mode triggers OpenAI修复了Codex中导致用户文件被意外删除的严重bug 问题根源是清理临时文件的命令错误使用了$HOME等系统变量,指向了真实用户目录 安全更新增加了删除目标验证、强制使用临时文件夹、严格检查危险命令等多重防护 建议用户优先使用沙盒模式并保持应用更新至最新版本

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

Analysis 深度分析

TL;DR

  • OpenAI's Codex (GPT-5.6 Sol) was autonomously deleting real user files due to a faulty cleanup command that misused system variables like $HOME
  • The root cause was a temporary file cleanup mechanism that incorrectly pointed at the user's actual home directory instead of a sandboxed temp folder
  • OpenAI shipped a security update introducing deletion target verification, mandatory fresh temporary folders, stricter checks on risky delete commands, and prevention of accidental full-access mode triggers
  • OpenAI now recommends users remain in sandbox modes and keep the application updated to avoid similar incidents

Why It Matters

This incident highlights a critical safety gap in AI coding assistants with filesystem access — even a single misfired command can cause irreversible data loss for real users. It underscores the importance of robust sandboxing and pre-execution verification in any AI system granted write/delete permissions, serving as a cautionary case study for the broader AI safety community.

Technical Details

  • Root Cause: A cleanup command intended to remove temporary working files was incorrectly resolving system variables (e.g., $HOME), causing it to target the user's actual home directory instead of an isolated temporary folder
  • Mitigation Measures: OpenAI implemented pre-execution verification of deletion targets, enforced creation of fresh temporary folders for each session, and added stricter command-level checks to intercept risky delete operations
  • Access Control Hardening: Full-access mode can no longer be accidentally triggered, reducing the attack surface for unintended destructive actions
  • User Guidance: OpenAI recommends sticking to sandbox modes and maintaining up-to-date installations as ongoing safeguards

Industry Insight

  • AI coding assistants with filesystem access must adopt a zero-trust execution model — every destructive command should require explicit verification before execution, regardless of the model's confidence
  • Sandbox isolation should be the default, not the exception; full-access modes should be opt-in with multi-factor confirmation to prevent accidental privilege escalation
  • This incident reinforces the need for industry-wide safety benchmarks and red-teaming protocols specifically targeting destructive command generation in AI coding tools

TL;DR

  • OpenAI修复了Codex中导致用户文件被意外删除的严重bug
  • 问题根源是清理临时文件的命令错误使用了$HOME等系统变量,指向了真实用户目录
  • 安全更新增加了删除目标验证、强制使用临时文件夹、严格检查危险命令等多重防护
  • 建议用户优先使用沙盒模式并保持应用更新至最新版本

为什么值得看

这篇文章揭示了AI编程助手在实际部署中可能带来的严重安全风险,提醒开发者关注AI工具的文件操作权限控制。对于使用Codex等AI编程工具的用户来说,了解这些防护措施有助于更好地保护个人数据。

技术解析

  • 问题根源:GPT-5.6 Sol模型在使用系统变量(如$HOME)创建临时文件夹时,由于删除命令存在缺陷,意外指向了用户的真实主目录而非临时目录,导致用户数据被清除
  • 修复方案:OpenAI在安全更新中引入了多重防护机制,包括在执行删除操作前验证目标路径、强制使用独立的临时文件夹、严格拦截高风险删除命令,以及防止意外触发完全访问模式
  • 用户建议:推荐使用沙盒模式运行Codex,确保应用保持最新状态以获得完整的安全补丁

行业启示

  • AI编程工具的文件操作权限管理是产品安全的关键环节,需要在模型能力与用户数据安全之间找到平衡点
  • 这类安全事件凸显了AI助手在实际生产环境中部署时需要建立更严格的权限隔离和审计机制

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

Code Generation 代码生成 Security 安全 LLM 大模型 Agent Agent Deployment 部署