Anthropic’s AI bug tests uncover previously undisclosed flaws in macOS, Linux and Rust
Anthropic tested four methods that use LLMs to find logic bugs in software. Agentic code review found the most bugs when the model received only the source code. In a separate round of testing, researchers found previously undisclosed bugs in Caliptra, macOS, the Linux eBPF verifier and the Rust compiler.
Logic bugs occur when software violates a rule it is expected to follow. These rules, known as invariants, are often implicit in the code and depend on what the program is designed to do.
“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,” the authors explained.
How Anthropic tested for known bugs
The benchmark included 21 bugs disclosed between 2016 and 2026. Nine came from SQLite, eight from image-png, three from zstd and one from Brotli.
The researchers gave the model the unpatched source code and withheld the patch. They counted a bug as rediscovered when a submitted input produced a different return value or output in the patched and unpatched versions. The grader used that difference to establish that the input had triggered the bug. The researchers assumed that a successful input reflected correct reasoning about the violated invariant.

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. (Source: Anthropic)
The team ran each method three times per bug and counted each rediscovery once. The model could submit up to 1,000 inputs per run, with scoring taking place after the run ended. In the blind trials, the model had to infer the invariant from the source code. In the informed trials, the researchers supplied the invariant alongside the code.
Which methods found the most bugs
Anthropic tested all four methods with Claude Mythos 5. In the blind trials, agentic code review rediscovered 11 of the 21 bugs and informal correctness proofs found eight. LLM-assisted fuzzing and LLM-driven symbolic execution found none.
When the researchers supplied the invariants, informal correctness proofs found all 21 bugs and agentic code review found 20. In the symbolic execution trial, the model found 13 bugs during source code review. The engine confirmed two of those findings. Fuzzing rediscovered one bug.
How performance varied by model
The researchers tested agentic code review in the blind setting across nine models. Claude Sonnet 4.5 rediscovered one benchmark bug, Claude Opus 4.5 found five, and Claude Mythos 5.2 found 15.
To assess if the models might have encountered the bugs in their training data, the team asked each model about all 21 without providing the source code. Sonnet 4.5 and Opus 4.5 recalled none. Sonnet 5 recalled three, about as often as it claimed to remember bugs the researchers had made up. Opus 5 and later models recalled eight to 10 of the 10 bugs disclosed through 2024 and at most one of the 11 disclosed after that.
Nine benchmark bugs went unrecognized by every model in the recall test. During code review, Sonnet 4.5 rediscovered none of those nine, Opus 4.5 found one, and Mythos 5.2 found five.
The benchmark runs also surfaced 316 distinct bugs outside the original set, all in older versions of the projects. The researchers used an LLM judge to verify findings and remove duplicates. Anthropic said 189 bugs had already been fixed or were known to maintainers and that it was reporting the remaining 127.
Previously undisclosed bugs
Agentic code review found a flaw in Caliptra’s firmware update process that could allow the chip’s root of trust to run unverified firmware. The same method uncovered a macOS flaw that could allow a local user to take ownership of files outside the protection of System Integrity Protection and gain root access. Both flaws were patched by the time Anthropic published its report.
Informal correctness proofs surfaced several dozen type-safety issues in the Rust compiler and more than 100 bugs in the Linux eBPF verifier, which checks whether programs can run safely in the kernel. One Rust finding showed that the compiler could accept code written entirely in safe Rust that accessed freed memory. Anthropic said Rust maintainers were working on a patch for that issue at publication. Maintainers had patched the eBPF bug described in the report.
Anthropic’s researchers said the results suggest recent models are “capable of identifying logic bugs without human guidance or specialized tooling.” They identified “forming the hypothesis given only the source code” as a continuing challenge.