Marius Fleischer, Alex Matrosov, Nicholas Carlini, and Milad Nasr / 文章
不给提示时,智能体代码审查从21个历史逻辑漏洞里找出了11个
Anthropic Frontier Red Team比较了四种用大模型找逻辑漏洞的方法。更简单的智能体代码审查和非正式正确性证明,明显强过给模糊测试或符号执行配大模型预言机。他们还用同样方法,在Caliptra、macOS、Rust编译器和Linux eBPF里找到了此前未公开的问题。
乔木改写
不给提示时,智能体代码审查从21个历史逻辑漏洞里找出了11个
给模糊测试或符号执行配上大模型预言机,在盲测里面对21个历史逻辑漏洞,一个都没找到。同一批漏洞,只用Claude Code做智能体代码审查,找出了11个。
2026年12月2日,Anthropic Frontier Red Team的Marius Fleischer、Alex Matrosov、Nicholas Carlini和Milad Nasr发表了这项研究。他们比较了四种用大模型找逻辑漏洞的方法,结论很明确:更简单、更让模型自己做主的办法,效果更好。

媒体未能载入,请通过下方原文链接查看。

逻辑漏洞指的是程序行为跟它本该遵守的规则,也就是不变量,发生了冲突。内存越界或崩溃这类问题,可以用消毒器和模糊测试去抓,因为无效内存访问在任何程序里都算错。逻辑漏洞通常不会触发这些通用检查,规则又往往是某个程序自己的、而且是隐含的,所以过去主要靠人做代码审查。
作者认为,大模型能从源码里推断意图、提出假设并去验证,正好可以补上这块工具空白。他们先用21个已经修补过的历史逻辑漏洞做基准,再在四个目标程序上找当时尚未公开的问题。
21个历史漏洞怎么判算找到
基准里的21个漏洞来自SQLite 9个、zstd 3个、brotli 1个、image-png 8个,披露时间从2016年到2026年。每种方法只拿到未打补丁的源码,要交一份能触发该漏洞的输入,才算证明自己找到了它。为了接近真实的0-day发现,尝试过程中不提供已修补的提交。
评分办法是比较同一份输入在未修补版本和已修补版本上的返回值或输出。如果行为不同,就记为成功。作者认为,这些补丁只改了该漏洞对应的代码路径,所以行为差异意味着输入走到了这条路径,并且带上了能触发问题的值。这套评分假定:能交出有效输入,就说明方法正确推理出了被违反的不变量。评分器没有单独核验这个假定,但作者说后面的实验表明,这个假定大体成立。
每种方法对每个漏洞跑三次,报告的是三次合在一起找到了多少个。单次运行最多可提交1000个输入,过程中不会告诉模型这个输入有没有打中目标漏洞,判断是在运行结束后才做。
基准分两种设置。盲测里,模型得不到关于漏洞的任何信息,只能从源码里推断不变量,接近完全自主的漏洞发现。知情设置里,会把每个漏洞违反的不变量连同源码一起给模型,模拟由人提供待测不变量的情况。
第一组实验用Claude Mythos 5,在知情和盲测两种设置下比较全部四种方法。第二组实验只看盲测下的智能体代码审查,模型从Claude Sonnet 4.5一直评到Claude Mythos 5.2。除了这21个目标漏洞对应的输入,他们还收集了其他提交,用一个大模型评审器核验真阳性并去重。
历史漏洞可能被写进训练数据。为了测量记忆,他们在普通对话里问起这21个漏洞,不提供源码。Claude 4.5系列一个都不记得;Sonnet 5记得3个,大约相当于它声称记得一些作者编造出来的漏洞的频率。Claude Opus 5及以后的模型,对2016到2024年间公开的10个漏洞记得8到10个,对11个更晚的漏洞最多只记得1个。第一组实验四种方法用的是同一个模型,受记忆影响较小。第二组实验里,他们把没有模型记得的9个漏洞单独报告。
四种方法,简单的反而更有效
第一种,给模糊测试配大模型预言机。模糊测试擅长探索程序行为,但缺少针对逻辑漏洞的可靠预言机。常见做法是人在代码里写入针对目标的assert,再靠覆盖率引导的变异去触发断言。这里改由大模型智能体来生成这些断言。模糊测试总时长是8小时,每小时会去掉至少被触发过一次的assert,好让测试继续往前走。
第二种,大模型驱动的符号执行。智能体可以访问代码,并生成符号执行引擎使用的测试夹具,夹具里的assert表示模型推断出的不变量。引擎用符号输入执行代码,收集路径约束,再让SMT求解器在这些约束下尝试打破断言。如果成功,求解器会给出一份具体输入,作为概念验证提交。符号执行的时限与模糊测试相同。
第三种,智能体代码审查。作者此前发现,把Claude Code指向一个代码库、让它找内存安全问题,效果很好。这里用同样的办法找逻辑漏洞:智能体可以读源码,也能对编译后的程序跑测试输入,并把觉得有价值的输入交上去评分。
第四种,非正式正确性证明。做法受形式化验证启发,但证明用自然语言写成,没有形式化保证,结构上接近数学证明,包含定理、定义、假定和引理。证明本身不必严格无误,它的作用是帮智能体把问题翻出来。证明里无法仅凭代码消解的命题,会由智能体变成具体输入,再作为概念验证提交。

媒体未能载入,请通过下方原文链接查看。

用Claude Mythos 5在21个漏洞的基准上看,智能体代码审查在知情设置里找到20个,盲测里找到11个。非正式正确性证明是知情21个、盲测8个。给模糊测试配预言机是知情1个、盲测0个。大模型驱动的符号执行是知情13个、盲测0个。
作者的概括是:简单的办法赢了。模糊测试和符号执行在不知情时都是零;一旦告知不变量,符号执行找到了13个。但作者写明,这并不代表符号执行的夹具更精、更有针对性。这些发现是大模型在写夹具时做源码审查时找到的,并且直接把相关输入交了上去。符号执行只确认了其中2个,没有超出模型源码审查已经找到的内容。模糊测试在知情设置下有一个变体:如果让模型控制种子和夹具,能找到21个里的15个。这15个同样都是模型先看出漏洞,再迫使模糊测试去“发现”,而不是模型真正改进了模糊测试设置,再由模糊测试自己找到。
即便如此,这两类方法仍然远落后于智能体代码审查。作者把原因归到不必要的复杂:模型必须沿着预先规定的路径交出发现,而不能自己选工具。模糊测试和符号执行还受固定规则和启发式限制。模糊测试只能覆盖夹具能够到达的功能,观察粒度也取决于仪器。符号执行则受引擎的固定策略和SMT求解器启发式约束,能走哪些路径、能发现哪些漏洞都会被卡住。智能体代码审查可以针对具体程序和具体漏洞形成假设,不必受固定预言机或探索策略限制。
知情设置里,提供不变量后能找到20到21个。作者据此认为,验证假设并不难。更难的是盲测:只看源码,先形成假设。

媒体未能载入,请通过下方原文链接查看。

盲测下的智能体代码审查,按模型看差距很大。以21个基准漏洞、其中没有模型记得的9个,以及其他已核验漏洞来计:Sonnet 4.5是1、0、18;Opus 4.5是5、1、17;Sonnet 5是4、0、21;Opus 5是9、2、33;Claude Mythos Preview是12、4、118;Claude Mythos 5是11、2、54;Claude Mythos 5.1是13、4、92;Opus 5.5是13、4、34;Claude Mythos 5.2是15、5、241。
就算只看没有模型记得的9个,趋势还在:Claude 4.5系列和Sonnet 5找到0到1个,Opus 5及以后找到2到5个。记住某个漏洞既不是找到它的必要条件,也不是充分条件。Claude Opus 4.5一个旧漏洞都不记得,却在10个较老的漏洞里找到了4个。多数较新模型都记得的两个SQLite漏洞里,盲测中没有模型找到其中一个,另一个只有Claude Mythos 5.2找到。

媒体未能载入,请通过下方原文链接查看。

基准以外的已核验漏洞里,规范符合类的数量大致持平,真正拉开差距的是逻辑漏洞。按逻辑漏洞、规范符合、内存安全三类计:Sonnet 4.5是2、16、0;Opus 4.5是1、16、0;Sonnet 5是7、14、0;Opus 5是14、19、0;Claude Mythos Preview是95、23、0;Claude Mythos 5是33、18、3;Claude Mythos 5.1是67、23、2;Opus 5.5是11、23、0;Claude Mythos 5.2是216、24、1。Mythos Preview在总计118个里有95个是逻辑漏洞,Mythos 5.2在241个里有216个是逻辑漏洞。作者认为,更新的模型更会提出有意义的假设,但即便较新的Mythos仍然受限于能否生成有用的不变量,人的协助仍有帮助。
这些实验还在目标源码里找到了基准以外的许多漏洞。所有方法和模型加在一起,共发现316个不重复漏洞。因为实验跑在过时版本上,他们把触发输入放到当前版本上重放,并对照代码注释和论坛讨论后认为:189个已在较新版本中修复,或维护者已经知道;剩下127个,他们正在向相应维护者报告。
附录里还有按方法统计的基准外真阳性:给模糊测试配预言机在知情和盲测里都是0;符号执行是知情1个、盲测3个;智能体代码审查是知情15个、盲测54个;非正式正确性证明是知情9个、盲测33个。作者用这组数字说明,相对表现并不是因为基准刚好选了某类漏洞。

媒体未能载入,请通过下方原文链接查看。

基准外这些计数,是由大模型评审器核验真阳性并去重的,不是人工逐条审完的最终清单。
四个此前未公开的例子
为了说明这两种更简单的方法也能找到0-day,作者报告了当时尚未公开的四个发现。
在开源硅根信任项目Caliptra上,他们用智能体代码审查找到了一个固件更新流程里的TOCTOU问题。作者写明,这套代码经过多家产品安全团队和外部审计,而且完全用Rust写成,内存安全问题大体不在范围内。漏洞出现在子系统模式下:ROM通过DMA从一块暂存区读取镜像并调用verify_image验证,接着把测量写入PCR0和PCR1,然后再从同一地址读一次,调用load_image把镜像拷进指令内存。两次读取之间,调用方可以改写暂存区。镜像不会再验一次,根信任就可能执行自己从未验证过的固件。这违反了“装上的固件应与已验证镜像一致”这条不变量。他们已向维护者报告,漏洞编号是CVE-2026-11835,维护者已经用补丁处理。
在macOS上,同一方法独立发现了CVE-2026-43783,文章发表时已经打上补丁。问题出在以root运行的DesktopServicesHelper。它用来帮Finder做当前用户没有权限的文件操作,比如改受保护文件,或修复iCloud Drive项目的权限。请求到来时,守护进程会检查调用方是否处于沙箱中。任何进程都可以用一次无特权调用让自己进入沙箱。对沙箱调用方,它会接受RepairPermissionsForCloudItems,不再做进一步检查。随后,以root运行的处理函数会按调用方给出的路径改文件所有者,并且不检查路径是否位于该用户的iCloud文件夹里。于是,包括无特权的nobody账户在内的本地用户,可以取得不受系统完整性保护(SIP)保护的任意文件的所有权,例如/etc/pam.d/su,进而在不用密码的情况下拉起root shell。作者还写明,这段代码片段是Claude从已发布的二进制里重建的。Apple的指针认证(PAC)和内存完整性强制(MIE)可以阻挡内存破坏,但挡不住这类逻辑漏洞。文中没有给出这条CVE的单独链接。
在Rust编译器上,他们用非正式正确性证明去论证“安全Rust是类型安全的”,结果发现了数十个类型安全问题。其中一个例子是一段会被编译器接受、却会访问无效内存的程序,可被用来在看起来类型安全的Rust代码里引入类型混淆。他们已向维护者报告,维护者正在编写补丁;文中说其他几个问题已经修好,这一处只是最好讲清楚的例子。对应讨论在rust-lang/rust#160525。编译器漏掉它,是因为没有把索引表达式内部发生的所有权移动,和对外层arr[0][...]的借用连起来看。
在Linux eBPF验证器上,他们用同一证明方法识别出一百多个健全性漏洞,并已全部报告给维护者。维护者在过去几个月里陆续修补。其中一处已在提交e51179a4e0中修复,漏洞编号是CVE-2026-98041。问题在于:指向map value的指针不可能为0,验证器因此认为ptr != 0这类比较恒为真,于是只检查它以为会走到的那一侧。这个结论只在比较全部64位时成立。eBPF还有32位比较,比较w1而不是r1时,比的是指针的低32位。这条2020年加入的规则,错误地把同一逻辑用到了w1上,没有考虑比较宽度。攻击者如果能让map_value的低32位为0,就能让验证器以为某段代码永远不会执行,从而跳过检查;真正运行时处理器还是会走到这段代码,并解引用验证器从未检查过的地址。作者写明,这允许用户态程序实现本地提权。验证器里其他处理空指针的部分已经排除了32位比较,但在数千行代码里,这一条漏了。
作者建议先从简单方法用起
作者的结论是:大模型扩大了现有漏洞发现方法的覆盖范围,也能加快已知问题的分诊。在他们的实验里,更简单、给模型更多自主权的智能体代码审查和非正式正确性证明,优于把大模型当作模糊测试预言机或符号执行前端。他们建议安全团队在寻找专用工具之前,先把这两种方法用到自己的代码库上。这是作者基于上述实验给出的建议,并不是对某个代码库已经完成修补的保证。
基准外的计数依赖大模型评审器,评分也假定“能触发输入就等于推理出了不变量”,这一点没有被单独核验。记忆可能影响较新模型在旧漏洞上的表现,作者已经把没有模型记得的子集分开报告。Caliptra和文中描述的macOS问题在发表时已经有补丁,Rust的这一处例子当时仍在修补,eBPF的这一处CVE已经修复。其他未在文中展开的报告,以维护者的公开记录为准。
原文
Finding logic bugs without general-purpose bug oracles

媒体未能载入,请通过下方原文链接查看。

媒体未能载入,请通过下方原文链接查看。

媒体未能载入,请通过下方原文链接查看。

媒体未能载入,请通过下方原文链接查看。

媒体未能载入,请通过下方原文链接查看。
Finding logic bugs without general-purpose bug oracles
Dec 2, 2026
Frontier Red Team
Marius Fleischer, Alex Matrosov, Nicholas Carlini, Milad Nasr

Logic bugs occur when software behaves in conflict with the implicit rules that govern how it should work (i.e., its invariants). These bugs are harder than usual to discover because developers are limited in the tools they can use to find them. Most general-purpose detection tools rely on general-purpose “bug oracles”—automated checks that recognize incorrect program behavior, like a program crashing or accessing memory incorrectly. Logic bugs, however, do not usually cause these kinds of failures, which means they require different methods. In this post, we describe and evaluate several ways of using LLMs to identify logic bugs. We developed a benchmark of 21 historical (i.e., since-patched) logic bugs that we collected from the change history of open-source codebases, and then tested out several new methods. Across our testing, simpler techniques—such as using LLMs to perform agentic code reviews—achieved the best results. Our results suggest that recent LLMs are capable of identifying logic bugs without human guidance or specialized tooling.
Introduction
The discovery of memory safety bugs relies heavily on robust bug oracles (e.g., sanitizers), combined with automated tools such as fuzzers or static analysis. But a lack of such tooling makes automated discovery for other bug classes, especially logic bugs, much more difficult—or sometimes even impossible. Sanitizers can detect memory safety bugs without any understanding of program logic, since an invalid memory access is a bug in any program. Logic bugs, on the other hand, depend on program invariants and context. As these are program-specific and often implicit, predetermined heuristics, rules, or oracles rarely apply. As a result, the discovery of logic bugs typically relies on human code reviews, which do not scale to large codebases.
LLMs allow us to fill this tooling gap. LLMs are highly capable at reasoning about (and inferring the intent of) source code and its invariants. This means they’re able to produce and then test out hypotheses that might lead them to detect logic bugs.
In this post, we study multiple methods for discovering logic bugs that use LLMs in this way. To do so, we assess how well models can detect 21 historical logic bugs, and then we assess their ability to find previously unknown logic bugs on four target programs. We describe logic bugs in Caliptra, an open-source silicon root of trust IP; macOS; eBPF; and the Rust compiler that were found through this effort. Notably, we find that techniques focused on simplicity achieve better results. For example, running Claude within a standard agentic harness (Claude Code) outperforms techniques that rely on fuzzing or symbolic execution. The former rediscovered 11 out of 21 bugs without Claude being provided any hints or information; the more complex techniques rediscovered none in the same setting. We therefore recommend that defenders start by applying the simple techniques discussed below to their own codebases before investing in specialized tooling.
Detecting historical logic bugs
Methods
We designed a set of techniques that use LLMs for logic bug discovery, and then tested their effectiveness on, first, a set of historical logic bugs, and second, on 0-day discovery. We constructed a benchmark of 21 logic bugs across SQLite (9), zstd (3), brotli (1), and image-png (8) disclosed between 2016 and 2026. For each technique, we provided the model with only the unpatched source code, and asked it to prove that it had rediscovered each bug by submitting an input that would trigger it. To mirror a realistic 0-day discovery scenario, we did not make the patched commit available to the model during the rediscovery attempt.
We scored each submitted input by comparing the behavior of the code between the unpatched and patched commits. If the behavior differed in return value or output, the grader scored the input as a success. This is sufficient to identify the bug as having been triggered. The patches of these 21 logic bugs only change the code path of the specific bug, so a difference in behavior means that the input reached this code path with values that trigger the bug. This grading system assumes that a technique that is able to produce a valid input must have correctly reasoned about the violated invariant to arrive at it. The grader did not explicitly verify this assumption. However, the experiments below suggest that this assumption generally holds true.
We ran each technique three times per logic bug. We report the total number of rediscovered bugs across all three runs. During a single run for any given technique, the model could submit up to 1,000 inputs for scoring, but received no feedback as to whether the input triggered the intended bug: this assessment was performed only after the run was completed.
The benchmark ran in two settings: blind and informed. In the blind setting, the model behind each run received no information about the bug (similar to a fully autonomous vulnerability discovery setting). Instead, it had to reason about and extract intent from the source code alone to infer the invariant. In the informed setting, the invariant violated by each logic bug was provided, along with the source. This mimics a setup in which the approach is guided by a human researcher who provides invariants to test.
We perform two experiments based on this benchmark. First, we use it to evaluate four techniques for finding logic bugs. We run each of the techniques with Claude Mythos 5 in both the informed and the blind settings. Second, to study the progression of model capabilities, we evaluate agentic code review in the blind setting on models from Claude Sonnet 4.5 to Claude Mythos 5.2. In addition to inputs corresponding to the 21 historical logic bugs, we collect all other submissions, and verify true positives and deduplicate bugs through an LLM judge.
Because the benchmark consists of historical bugs, a model might remember a bug from its training data instead of rediscovering it. To measure this, we asked each model about each of the 21 bugs in a plain conversation, without the source code. The Claude 4.5 models remember none of the bugs, and Sonnet 5 remembers three (about as often as it claims to remember bugs we made up). Claude Opus 5 and later models remember between 8 and 10 of the 10 bugs that became public between 2016 and 2024, and at most one of the 11 later bugs. The first experiment is less exposed to memorization, since all four techniques use the same model. For the second experiment, we separately report the results on the nine bugs that no model remembers.
Techniques we tested
LLM oracles for fuzzing
Fuzzing is effective at exploring program behavior but lacks a reliable oracle for logic bugs. The typical way of finding bugs other than memory corruptions with fuzzers involves a human writing target-specific invariants in the form of assert statements directly in the code. This allows the fuzzer to identify logic bugs by finding concrete inputs through coverage-guided mutation that trigger an assert violation. The approach used here generates these assertions through an LLM agent instead of a human. Total fuzzing time is eight hours. Once per hour, any assert that was triggered at least once is removed to allow for more fuzzing progress.
LLM-driven symbolic execution
This approach combines an LLM agent with symbolic execution by allowing an agent with code access to generate the harness used by the symbolic execution engine. The harness includes assert statements that represent the invariants inferred by the LLM. The symbolic execution engine executes the code using symbolic inputs, collects path constraints during its traversal, and attempts to violate the asserts using an SMT solver under the collected path constraints. If successful, the SMT solver provides a concrete input that violates the assert statement, which is then submitted as a proof of concept (PoC). The symbolic execution engine receives the same execution time as the fuzzer.
Agentic code review
Previous experiments showed that simply pointing Claude Code at a codebase with the task of identifying memory safety issues is highly effective. Based on this experience, we test the same approach for logic bug discovery: an LLM agent is given source access and the ability to run test inputs against the compiled codebase. The agent submits interesting inputs discovered through this process as PoCs for judging.
Informal correctness proofs
This approach, inspired by formal verification, tasks an agent to produce a correctness proof document to prove invariants or properties of the target application. The proof is written in natural language with no formal correctness guarantees. Its structure resembles that of a mathematical proof, including theorems, definitions, assumptions, and lemmas. It is not important, however, that the proof is strictly correct or error-free. It is merely a tool for the agent to surface bugs. Each claim the proof depends on that cannot be discharged based on the code is turned into a concrete input by the agent and submitted as a PoC for scoring.
Results

Historical logic bugs rediscovered by each technique on the 21-bug benchmark with Claude Mythos 5 across informed and blind settings. Agentic code review and informal correctness proofs clearly outperform the other two techniques.
Simplicity wins. On the set of historical logic bugs, the best-performing approaches are agentic code review and informal correctness proofs, which perform similarly in both settings, as shown in Figure 1. LLM oracles for fuzzing and LLM-driven symbolic execution score zero bugs unless they’re provided with information about the intended finding. When provided with information about the invariants, the symbolic-execution-based approach is able to discover 13 of the bugs. Notably, this discovery does not represent a higher-quality or more targeted symbolic execution setup. Instead, the LLM discovered the findings during its source review to write harnesses and submitted the relevant inputs directly. Symbolic execution was able to confirm two of the bugs but did not contribute anything beyond the findings of the LLM’s source review. A variant of the fuzzing technique showed the same behavior in the informed setting. If given control over seeds and harnesses, this approach rediscovered 15 out of the 21 bugs. All 15 rediscoveries, however, were a result of the LLM spotting the bug and forcing the fuzzer to discover it rather than the LLM meaningfully improving the fuzzing setup and the discovery being a result of that.
Even though the successful rediscoveries of the fuzzing and symbolic execution techniques came from the LLM’s source review, they stayed far behind the agentic code review approach. This is due to their unnecessary complexity—the LLM had to find a way to provide its findings through the predetermined pathway, rather than allowing the agent to choose appropriate tooling—as well as the inherent limitations of fuzzing and symbolic execution. In particular, both techniques rely on predefined rules and heuristics rather than reasoning about the concrete program and bug at hand. Fuzzers can only exercise program functionality that is reachable through the fuzzing harness, and can observe program behavior only at the granularity of the instrumentation they were built with. Symbolic execution is limited by its engine’s fixed strategies and by the predefined heuristics from the SMT solver it relies on. These strategies and heuristics limit which paths symbolic execution can explore and which bugs it can discover. Agentic code review, on the other hand, can reason about program behavior and form hypotheses without being restricted by a fixed oracle or exploration strategy. This allows agentic code review to customize the discovery process to the target, as a human researcher would.
In the appendix, we provide further evidence that the relative performance of the approaches is not the result of the selection of bugs in the benchmark.

Bug discovery counts for agentic code review in the blind setting for bugs within and outside of the collected set for multiple models. Bugs outside the collected set are verified true positives and deduplicated by an LLM judge. Newer Claude Opus and Claude Mythos models outperform smaller and older models across both categories.

Verified bugs outside the benchmark set by model generation and bug class. Although the number of specification conformance bugs is roughly flat, the number of discovered logic bugs clearly distinguishes between Claude Mythos models and other models.
Invariant generation improves. For agents to fully autonomously discover logic bugs, they need to be able to form hypotheses about the intent behind the code, in addition to being able to test the hypothesis. The informed setting suggests that testing the hypothesis is not challenging (20–21 of 21 bugs were found when the invariant was provided). The blind setting measures the harder part—forming the hypothesis given only the source code.
Older and smaller models such as Claude Sonnet 4.5 (which rediscovered one bug) or Opus 4.5 (five) perform substantially worse in the blind setting compared with newer Opus (9 to 13) and Claude Mythos (11 to 15) models (see Figure 2). Even when accounting for potentially memorized bugs, the trendline remains. Of the nine bugs that no model remembers, the Claude 4.5 models as well as Sonnet 5 rediscover zero to one of them, whereas Opus 5 and later models rediscover two to five. Remembering a bug is also neither necessary nor sufficient to rediscover it: Claude Opus 4.5 rediscovers 4 of the 10 older bugs without remembering any of them. Of the two SQLite bugs that most newer models remember, no model rediscovers one in the blind setting, and only Claude Mythos 5.2 rediscovers the other.
Outside of the benchmarked set of bugs, Claude Mythos models similarly outperform older models, with 54 to 241 total bugs relative to 17 to 18 bugs for models in the Claude 4.5 generation. All generations find a similar number of specification conformance bugs, but newer and more capable models increasingly also discover logic bugs. Claude Mythos Preview found 95 logic bugs out of a total of 118; Claude Mythos 5.2 found 216 logic bugs out of a total of 241 (Figure 3). The Claude Mythos models’ higher share of logic bugs suggests an improved ability to generate meaningful hypotheses. Although even recent Claude Mythos models are still limited by their ability to generate useful invariants and can benefit from human assistance, the trendline suggests that future models will be capable of fully autonomous and effective logic bug discovery.
Bugs discovered outside the intended set. During the experiments for rediscovering 21 historical logic bugs, all approaches found various other bugs in the target source code. Across all techniques and models, the experiments discovered a total of 316 unique bugs. Because of the setting of the experiment, all of these were discovered on outdated versions of the target programs. Replaying the triggering inputs on a current version of the target (along with code comments and forum discussions) shows that 189 bugs have been fixed in newer versions of the targets, or are already known to the maintainers. We are in the process of reporting the remaining 127 to the respective maintainers.
Discovering 0-days
To further demonstrate that agentic code review and informal correctness proofs are effective ways of finding logic bugs, we attempted to find 0-days using these approaches. We describe four of the resulting findings below. These bugs were not publicly known at the time we discovered them.
Logic bug in Caliptra
For agentic code review, we selected the open-source silicon root of trust Caliptra as the target. Caliptra is a highly secured codebase that has been audited by leading product security teams as well as external auditors. On top of that, it’s written entirely in Rust, so memory safety issues are largely out of scope. Claude was able to discover a time-of-check-to-time-of-use bug in the ROM’s firmware update flow that allows a compromised component on the same chip to make the root of trust execute firmware it never verified.
let image_source = if env.soc_ifc.subsystem_mode() {
let axi_addr = staging_addr.unwrap_or_else(|| mci_base + caliptra_drivers::dma::MCU_SRAM_OFFSET);
caliptra_common::verifier::ImageSource::Axi { dma: &env.dma, axi_start: AxiAddr::from(axi_addr) }
} else { /* ..[snip].. mailbox memory */ };
let mut venv = // ..[snip].. contains image_source
let info = Self::verify_image(&mut venv, &manifest, img_bundle_sz); // first read of the staging area
let info = okref(&info)?;
report_boot_status(UpdateResetImageVerificationComplete.into());
// ..[snip].. Extend PCR0 and PCR1
report_boot_status(UpdateResetExtendPcrComplete.into());
// ..[snip]..
Self::load_image(&manifest, &mut recv_txn, &mut env.soc_ifc, &mut env.dma, staging_addr)?; // second read of the same area
The above code snippet shows the relevant lines of code that install a new firmware image at runtime. In subsystem mode, Caliptra receives an address of a staging area with the new image through its mailbox. The ROM reads the manifest and image from that address over DMA and verifies the image via verify_image. Next, it extends the measurement registers PCR0 and PCR1 with the verified image, and then reads from the same address a second time to copy the image into its instruction memory by calling load_image. Between these two reads, the caller could overwrite the staging area with arbitrary data and instructions. As the image is not verified again, this modification would go undetected. This behavior violates the invariant that the installed firmware image is the same as the verified one.
We have reported the bug to the maintainers, who assigned it CVE-2026-11835 and have since addressed this issue with a patch.
Logic bug in macOS
Using our agentic code review approach, we independently discovered CVE-2026-43783 (now patched). macOS uses small privileged helper daemons to provide specific privileged operations to unprivileged apps. As these services run as root, each has to decide whether it trusts a caller and whether it should accept a request. Any mistake in this process can open significant privilege escalation routes. Apple’s mitigations, such as pointer authentication (PAC) and Memory Integrity Enforcement (MIE), stop memory corruption bugs, but offer no protection against such logic bugs.
DesktopServicesHelper is the root helper used by Finder for file operations not permitted to the logged-in user. Examples of such operations include changing protected files or fixing permissions on iCloud Drive items. Claude found this bug, CVE-2026-43783, in DesktopServicesHelper. It allows any local user, including the unprivileged nobody account, to take ownership of any file on the system that isn’t protected by System Integrity Protection (SIP). This capability can be used to spawn a root shell without a password.
// request gate: trust is decided by whether the caller is sandboxed
if (sandbox_check_by_audit_token(peer_token, ...) /* sandboxed */) {
allowed = { "Handshake", "RepairPermissionsForCloudItems", "DeleteItem", ... };
} else {
require_entitlement("com.apple.private.tcc.allow", kTCCServiceSystemPolicyAllFiles);
}
// RepairPermissionsForCloudItems, for each caller-supplied path:
fd = open(path, O_SYMLINK); fstat(fd, &st);
if (S_ISDIR(st.st_mode) || st.st_nlink < 2) {
uid = caller_euid; // euid of the XPC client
if (st.st_uid != uid)
fchown(fd, uid, st.st_gid); // runs as root
}
The snippet above was reconstructed by Claude from the shipped binary. When a request arrives, the daemon checks whether the caller is sandboxed. Any process can sandbox itself with a single, unprivileged call. The daemon accepts RepairPermissionsForCloudItems from any sandboxed caller with no further check. The handler, running as root, then changes ownership of each path it receives to the caller without checking that the path is inside the caller’s iCloud folder. Therefore, an attacker can take ownership of system files such as /etc/pam.d/su, which can subsequently be used to allow the unprivileged user to spawn a shell as root.
Logic bugs in the Rust compiler
Rust is a type-safe programming language that guarantees code is memory safe. This means that if you write a valid Rust program (and don’t use the “unsafe” keyword), then any program that is expressible in the Rust type system should not be allowed to access invalid memory. Upholding this guarantee for any valid Rust program is an invariant of the Rust compiler. Although these are bugs—and not security vulnerabilities—here we hope to show that LLMs’ ability to find logic bugs is applicable to more than just security and 0-day finding.
We tasked Claude with proving that safe Rust is type-safe through the informal correctness proof technique. This resulted in the discovery of several dozen type safety issues. One of these is the counterexample shown below. This is a program that the Rust compiler accepts even though it accesses invalid memory. This bug could be used to introduce type-confusion bugs into seemingly type-safe Rust code. We have reported the bug to the maintainers, who are working on a patch. (Several others have already been fixed, but this one is the simplest to describe.)
fn main() {
let mut arr = [[Box::new(42)]];
let alias = &mut arr[0][{ let [row] = arr; drop(row); 0 }];
println!("{}", **alias); // use-after-free of arr's dead stack slot
}
The code snippet first defines a two-dimensional array arr whose single element is an owning pointer to an i32 on the heap (i.e., the integer has exactly one owner). In the next line, alias is intended to be an exclusive reference to the only element in arr, i.e., arr[0][0]. While calculating the second index value, the ownership of the inner array of arr is moved to row. This should result in the compiler treating arr as no longer holding a value. Next, drop frees the owning pointer and with it the i32 on the heap. As a consequence, at the time the reference to arr’s single element is assigned to alias, this memory has already been released. The compiler missed this bug because it fails to connect the ownership move of arr inside the index expression with the borrow of arr[0][...].
Logic bugs in eBPF
The extended Berkeley Packet Filter (eBPF) is a programming language that allows user applications to run code directly in the Linux kernel. At face value, this seems to violate one of the core design principles of an operating system: the entire purpose of the kernel is to isolate different user applications from each other. Allowing a user to write code that runs in the context of the kernel appears to be something that should be prohibited by design.
But eBPF takes a clever approach to safety: before running any user-supplied code in the kernel, it runs a verifier over the program. The verifier is supposed to prove that the code is well-behaved and only takes certain allowed actions (for instance, that it is verified to terminate, to only ever read from or write to a small bounded region of memory, and so on). A program, then, is said to be sound if it respects these security properties.
Using the same informal proof technique discussed above, we identified over a hundred soundness bugs in the eBPF verifier. We have reported all of these to the maintainers, who have, over the past few months, been working through and patching these. One of these, fixed in commit e51179a4e0 and filed as CVE-2026-98041, is described here. Consider the following eBPF program:
r1 = map_value; /* valid pointer; low 32 bits are zero at runtime */
r6 = 0xdead000000000000;
if w1 != 0 goto l1; /* 32-bit compare; verifier assumes always taken */
l0: r1 += r6;
r2 = *(u64 *)(r1 + 0);
exit;
l1: r6 = 0;
goto l0;
To avoid analyzing paths that can never execute, the verifier tries to predict the outcome of conditional branches like the one on line 3 (if w1 != 0 goto l1). If the verifier can prove that a branch always goes one way, it only checks that side. There are many rules of this form, and one of them concerns null checks. Because a pointer to a map value (a region of memory shared between an eBPF program and userspace) is known to be valid, it can never be equal to zero. The verifier therefore concludes that a comparison of the form ptr != 0 is always true (because it is!).
But this is only the case when all 64 bits of the pointer are compared. eBPF also has 32-bit comparisons, and when you compare w1 instead of r1 you compare the lower 32 bits of r1. The verifier erroneously applied the same rule to w1 without taking the width of the comparison into account. Therefore, an attacker who can arrange for the lower 32 bits of map_value to be zero can cause the verifier to believe the code can never run—and therefore the code does not get analyzed, even though it can run.
In the program above, the verifier decides that the jump to l1 is always taken, and that it is therefore not necessary to check if the read of (r1 + r6) is valid.
During the actual execution of the program, the processor reaches l0, because it doesn’t get confused in the same way by the size of the values. With r6 still holding a value chosen by the attacker, the processor then dereferences an address that the verifier never checked. Other parts of the verifier that reason about null pointers already excluded 32-bit comparisons, but out of several thousand lines of code, this one rule, which was added in 2020, was missing the check.
This vulnerability allows a userspace program to achieve local privilege escalation.
Conclusion
LLMs substantially extend the coverage of existing, effective approaches to vulnerability discovery, helping defenders scale the reach and speed of their work, whether they are finding new issues or triaging known ones. Finding bugs beyond memory safety is no longer constrained by tooling gaps such as missing sanitizers.
Defenders should broaden their efforts accordingly. To do so, security teams can increasingly rely on LLMs to close the tooling gap, since LLMs can form and test hypotheses grounded in code behavior, semantics, and developer intent. In our experiments, setups that favor simplicity and that give the LLM more agency (namely, agentic code review and informal correctness proofs) outperformed more complex approaches, such as using LLMs as fuzzing oracles. As models become better at inferring intent, we expect the share of logic bugs that are discovered without human assistance to continue growing. Before looking for specialized tooling, we therefore recommend that defenders first apply agentic code review and informal correctness proofs to their own codebases.
Appendix

True-positive bugs outside the benchmark set, verified and deduplicated by an LLM judge by technique in the informed and blind settings. Agentic code review and informal correctness proofs find far more non-target bugs than LLM oracles for fuzzing or LLM-driven symbolic execution.
To understand whether the choice of logic bugs in the evaluation set skews the results, we further analyzed all submissions that did not match the intended bugs. We use an LLM judge to identify true bugs and deduplicate findings. As with the results on the intended logic bugs, agentic code review and informal correctness proofs perform substantially better than the LLM oracles for fuzzing or LLM-driven symbolic execution.