---
title: "GPT-5.6 Codex 严重漏洞：全权限模式下意外删除文件"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Jul/16/bad-codex-bug/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_0474f9c399b0290d16c691a5"
published: "2026-07-16T17:45:59.000Z"
score: 71
channel: "ai"
tags: ["Codex","GPT-5.6","OpenAI","编码代理安全"]
---

# GPT-5.6 Codex 严重漏洞：全权限模式下意外删除文件

## AI 点评

> 这是迄今为止披露的最具破坏性的AI编码代理漏洞之一，直接威胁用户文件安全。所有使用AI辅助编程工具的开发者都应立即检查防护设置，切勿在无沙箱的全权限模式下运行。

## 速览

据Simon Willison博客引用Thibault Sottiaux的报告，GPT-5.6的Codex工具在启用全权限模式且未开启沙箱保护时，可能因错误覆盖$HOME环境变量而意外删除用户文件。该漏洞凸显了AI编码代理的安全风险，尤其在没有自动审核的情况下。

## 关键点

- 全权限模式下，Codex无沙箱保护运行可能导致文件删除。
- 模型试图覆盖$HOME环境变量时，错误地将$HOME本身删除。
- 该漏洞在未启用自动审核时最容易发生，建议用户开启沙箱或审核功能。

## 全文

On file deletions. We’ve investigated a handful of reports where GPT-5.6 unexpectedly deleted files. What we have found is that this most commonly occurs when: Full access mode is enabled and codex is run without sandboxing protections, including without auto review being enabled The model attempts to override the $HOME env var to define a temporary directory. The model makes an honest mistake and mistakenly deletes $HOME instead. — Thibault Sottiaux, describing a pretty gnarly Codex bug Tags: codex, coding-agents, generative-ai, ai, llms

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_0474f9c399b0290d16c691a5
