深翼判例库DeepWing Case Library · INC-050 · 门禁层Access Control);次层:知识层
自主攻击 agent 约两小时打穿 McKinsey 内部 AI 平台 Lilli:未鉴权端点与字段名 SQL 注入取得生产数据库完整读写,影响规模两说并列。 一句话(英):An autonomous attack agent breached McKinsey's internal AI platform Lilli in about two hours: unauthenticated endpoints and a field name SQL injection gave full read and write access to the production database; the impact scale remains disputed.An autonomous attack agent breached McKinsey's internal AI platform Lilli in about two hours: unauthenticated endpoints and a field name SQL injection gave full read and write access to the production database; the impact scale remains disputed.
本条在判例库中的登记行This entry in the Case Library: deepwingai.com/cases#INC-050
时间线Timeline
已证实事实Confirmed facts
Lilli 是 McKinsey 内部 AI 平台,2023 年上线,服务 43,000 名以上员工,采用率逾 70%,每月处理提示 50 万次以上(平台背景数字据 CodeWall 披露原文)。2026-02-28,安全公司 CodeWall 的自主进攻型 agent 在无凭据、无内部知识、无人在环的条件下,从公开暴露的 API 文档入手取得完整读写权限。攻击链据 CodeWall 披露原文:Lilli 的 API 文档公开暴露,文档化端点 200 个以上,其中 22 个无需鉴权;一个未鉴权端点把用户搜索查询写入数据库,查询值已作参数化处理,但 JSON 键名(字段名)被直接拼接进 SQL 语句,agent 从数据库错误信息中逐字回显的键名识别出注入点,经 15 次盲注迭代逐步摸清查询结构,直至生产数据开始回流;CodeWall 称 OWASP ZAP 等标准工具未检出此问题。同一注入同时给出读与写权限。agent 另链合一处 IDOR 漏洞,读取了单个员工的搜索历史。CodeWall 于 2026-03-01 向 McKinsey 作负责披露,McKinsey 于 03-02 修复全部未鉴权端点、开发环境下线、公开 API 文档封堵(修复一项 CodeWall 标注为已核验),03-09 CodeWall 公开披露。
影响范围(全部据 CodeWall 披露原文,为披露方单方口径,未经独立证实,引用须带归属):对话消息 4,650 万条、文件记录 72.8 万份、用户账号 5.7 万个、AI 助手 38.4 万个、工作空间 9.4 万个、RAG 文档块 368 万条、经外部 AI API 流转的文件 110 万份与 agent 消息 21.7 万条,以及与生产数据同库存储的系统提示词与模型配置 95 项,覆盖 12 类模型。CodeWall 称持有写权限者可经一条 UPDATE 语句改写系统提示词,无需部署、无需改代码;其表述为「本可改写」,未称实际执行过改写。CodeWall 自述全部测试为验证性访问,限于确认漏洞所需的最小程度,未造成生产服务中断。
争议并列:McKinsey 官网 2026-03-11 声明(与 03-09 给 The Register 的声明核心句同文、口径一致)称:「由一家领先的第三方取证公司支持的我方调查,未发现客户数据或客户机密信息被该研究者或任何其他未授权第三方访问的证据。」(节译,末句为当事方自我评价句,从略;英文原文见信源全称所列官网页。)另据 Financial Times 引 McKinsey 消息人士的说法(经 The Register 转述),底层文件单独存储、「从未处于风险之中」,与 CodeWall 关于文件记录的说法冲突。第三方分析者 Edward Kiledjian 在 The Register 报道中表示,CodeWall 所述攻击链可信且技术上成立,但其声称的影响范围未被充分证明;Promptfoo 的分析亦指出,精确载荷未公开,公开记录不能独立证明每一个行数与利用步骤。三方说法并列,本条不裁定;规模数字按「可达范围」记录并带归属,「可达」与「实际取走」在现有公开材料中无法区分,此限度随条目长期保留。
Lilli is McKinsey's internal AI platform, launched in 2023, serving more than 43,000 employees with adoption above 70 percent and more than 500,000 prompts a month (platform background figures per CodeWall's disclosure). On February 28, 2026, security company CodeWall's autonomous offensive agent, working with no credentials, no internal knowledge and no human in the loop, started from Lilli's publicly exposed API documentation and obtained full read and write access to the production database. The attack chain, per CodeWall's disclosure: the API documentation was publicly exposed, listing more than 200 endpoints, 22 of them requiring no authentication; one unauthenticated endpoint wrote user search queries into the database, where the query values were parameterised but the JSON keys (field names) were concatenated directly into the SQL statement; the agent recognised the injection point from key names echoed back in database error messages and, over 15 blind injection iterations, mapped the query structure until production data flowed back; CodeWall states that standard tools such as OWASP ZAP did not detect the issue. The same injection granted both read and write. The agent also chained an IDOR flaw to read one employee's search history. CodeWall disclosed responsibly to McKinsey on March 1; McKinsey fixed all unauthenticated endpoints, took the development environment offline and blocked the public API documentation on March 2 (the fix item marked verified by CodeWall); CodeWall published on March 9.
Impact scope (all figures per CodeWall's disclosure, one party's account, not independently confirmed, attribution required when cited): 46.5 million chat messages, 728,000 file records, 57,000 user accounts, 384,000 AI assistants, 94,000 workspaces, 3.68 million RAG document chunks, 1.1 million files passed through external AI APIs and 217,000 agent messages, plus 95 system prompt and model configuration items stored in the same database as production data, across 12 model types. CodeWall states that a holder of the write access could have rewritten system prompts with a single UPDATE statement, with no deployment and no code change; its wording is that this could have been done, and it does not claim to have done it. CodeWall describes all of its testing as verification access, limited to the minimum needed to confirm each flaw, with no production outage.
The dispute, carried side by side: McKinsey's statement of March 11, 2026 (core sentence matching its March 9 statement to The Register) says its investigation, supported by a leading third party forensics firm, identified no evidence that client data or client confidential information were accessed by this researcher or any other unauthorised third party. Separately, the Financial Times, citing a McKinsey source via The Register, reported that the underlying files were stored separately and were never at risk, which conflicts with CodeWall's file record account. Analyst Edward Kiledjian, quoted by The Register, called CodeWall's attack chain credible and technically sound but its claimed impact scope insufficiently proven; Promptfoo's analysis likewise notes that the exact payloads are unpublished and the public record cannot independently prove every row count and exploitation step. This entry adjudicates none of the three accounts: scale figures are recorded as reachable scope with attribution, and the gap between "reachable" and "actually taken" cannot be closed from public material; that limit stays with the entry.
失效机制Failure mechanism深翼分析DeepWing analysis
一,这是一起双侧都是 agent 的事件。攻击侧,agent 自主选题、自主枚举、以机器速度链合漏洞,全程无人在环;防御侧,被打穿的不是普通业务系统,而是企业自建的 AI 平台本身,平台聚合了全员对话、知识库与指令配置,一处失效的爆炸半径由平台的聚合程度决定。二,失效与模型无关,与架构耦合有关:注入点是最传统的漏洞类别,平台已在生产环境运行逾两年,其自有扫描器未检出该注入(据 CodeWall 披露);真正放大后果的是耦合方式,对话数据、RAG 知识库、系统提示词同库同权,门禁层一个点破口,数据层与指令层同时失守。三,提示层是本条最值得留档的一点:系统提示词作为可变应用数据与业务数据同库存储时,它继承的是数据库的行级权限,而不是行为控制权应有的变更管控;改一条记录即可静默改变数万名员工所用 AI 的回答与护栏,且不产生部署记录。提示词的存放位置、写权限与完整性监控,应按行为控制资产而不是配置数据来治理。四,响应侧是对账账上的正面样本,认定侧是缺口样本:McKinsey 在披露次日完成修复、十天内公开声明,宣布与落地的距离很短;但影响范围由披露方按可达范围报数、由当事方按取证结论报零,两套口径至今没有共同的认定标准,企业 AI 平台事件的影响认定规则缺位,本身是治理账上的一条。防控对照(深翼按框架口径整理,非当事方原文):预防性控制,生产端点默认鉴权,未鉴权端点逐个登记并说明必要性,API 文档不得公开暴露生产接口清单,SQL 构造对字段名与值同等校验,系统提示词离开业务数据库独立存放,写入走独立权限与审批;侦测性控制,生产数据库的异常枚举型读取应有告警,提示词配置应有完整性监控与变更留痕;恢复性控制,见事实段 McKinsey 的修复动作。
First, this is an agent on both sides event. On the attack side, an agent chose its own targets, enumerated on its own and chained flaws at machine speed with no human in the loop. On the defence side, what was breached was not an ordinary business system but the company's own AI platform, which aggregates every employee's conversations, the knowledge base and the instruction configuration, so the blast radius of a single failure is set by the platform's degree of aggregation. Second, the failure is unrelated to the model and related to architectural coupling: the injection point is the most traditional flaw class, the platform had been running in production for over two years and their own scanners failed to find the injection (per CodeWall); what amplified the consequences is the coupling, conversation data, the RAG knowledge base and system prompts in one database under one permission set, so one breach at the access layer surrendered the data layer and the instruction layer together. Third, the prompt layer is this entry's most archivable point: when system prompts are stored as mutable application data alongside business data, they inherit database row permissions instead of the change control that behavioural authority should carry; editing one record silently changes the answers and guardrails of an AI used by tens of thousands of employees, with no deployment record. Where prompts live, who can write them and how their integrity is monitored should be governed as behavioural control assets, not configuration data. Fourth, the response is a positive sample on the reconciliation ledger and the attribution is a gap sample: McKinsey completed its fix the day after disclosure and published a statement within ten days, a short distance between announcement and landing; but impact is reported by the discloser as reachable scope and by the operator as zero on forensic findings, with no shared standard for deciding between the two, and that missing standard for impact determination in enterprise AI platform incidents is itself an entry on the governance ledger. Controls (compiled by DeepWing on framework lines, not the parties' wording): preventive, authenticate production endpoints by default and register every unauthenticated endpoint with its justification, never expose the production interface inventory in public API documentation, validate SQL field names as strictly as values, store system prompts outside the business database with separate write permission and approval; detective, alert on enumeration style reads against production databases and keep integrity monitoring with change trails on prompt configuration; recovery, see McKinsey's fix actions in the facts section.
工程启示Engineering lessons
预防性控制:生产端点默认鉴权,未鉴权端点逐个登记并说明必要性;API 文档不得公开暴露生产接口清单;SQL 构造对字段名与值同等校验;系统提示词离开业务数据库独立存放,写入走独立权限与审批。
侦测性控制:生产数据库的异常枚举型读取应有告警;提示词配置应有完整性监控与变更留痕。
恢复性控制:见事实段 McKinsey 的修复动作:披露次日修复未鉴权端点、开发环境下线、公开 API 文档封堵。
Preventive controls:authenticate production endpoints by default and register every unauthenticated endpoint with its justification; never expose the production interface inventory in public API documentation; validate SQL field names as strictly as values; store system prompts outside the business database with separate write permission and approval.
Detective controls:alert on enumeration style reads against production databases; keep integrity monitoring with change trails on prompt configuration.
Recovery controls:see McKinsey's fix actions in the facts: endpoints fixed, development environment offline and public documentation blocked the day after disclosure.
你的系统里,Agent 的对外动作有人盯着吗?Is anyone watching what your agents do outside your system?
做 17 题免费自检Take the free 17-question self-check