Microsoft FORGE Lab: AI scanning helped find Rust standard library bugs
Microsoft's FORGE Lab reported soundness bugs in Rust's standard library, some found with an AI scanning system it calls Hyenas.
· Microsoft · Research by Yechan Bae, Microsoft FORGE Lab
Microsoft's FORGE Lab published the memory-safety bugs it reported in Rust's core and std libraries, several of which let safe code reach undefined behavior. Microsoft says some were found with Hyenas, its AI vulnerability scanner.
01What happened
Microsoft published a FORGE Lab write-up on November 9, 2026 covering memory-safety issues the team reported to Rust maintainers through 2026. Yechan Bae and the FORGE Lab team describe bugs in core and std where safe Rust can reach undefined behavior. Microsoft says some of them were found with help from Hyenas, which it calls the frontier research version of a system codenamed MDASH, and the post does not say which bugs the system found.
02How it works
Most of the reported bugs break an invariant that unsafe code relies on when user-supplied code runs in the middle of an operation. MapWindows::clone dropped a partly initialized buffer when a user's clone panicked. A custom Pattern passed to str::replace could build a String that is not valid UTF-8. Custom allocators that unwind could corrupt BTreeMap::insert, so the Allocator API was stabilized with a rule that implementors must not unwind.
03Who is affected
Named affected releases include Rust 1.96.0 for the str::replace pattern bug, 1.97.0 for MapWindows::clone, 1.98.0 for the process::exit signal-stack issue and 1.99.0 for the CommandExt::exec environment race. Microsoft states that a standard library soundness bug is not automatically a vulnerability in an application, because the real risk depends on whether the program reaches the API in the triggering way.
04What to do
Authors of unsafe Rust should treat any call into code they do not control, including clone, drop, comparisons and closures, as a possible early exit, and finish risky work before breaking invariants. Allocator implementors should never unwind from allocator trait methods or from drop.
Sources 2 links, all fetched
- 1microsoft.comFORGE Lab Write-Up
- 2github.comRust Issue 156501