AI
LLMs boost symbolic execution for finding software vulnerabilities
Researchers enhance KLEE with AI-guided path prioritization to escape infinite loops and discover hidden bugs.
A research team has developed KLEECopilot, an extension to the KLEE symbolic execution engine that uses large language models to find security flaws more efficiently in software code.
The Problem with Path Explosion#
Symbolic execution is a well-established technique for uncovering security vulnerabilities by exploring all possible execution paths through a program. However, it faces a critical limitation: path explosion, where the number of possible paths grows exponentially. Traditional tools like KLEE manage this by prioritizing which paths to explore first, but they often optimize for general code coverage rather than vulnerability discovery.
This coverage-focused approach has a blind spot. When code contains cyclic control-flow regions—loops that branch repeatedly without reaching vulnerable code—the exploration budget gets consumed navigating these cycles. By the time the engine escapes, it may lack resources to probe the deeper, potentially dangerous sections of the program.
How KLEECopilot Works#
The new system addresses this in two complementary ways. First, it harnesses LLMs to identify potentially vulnerable code locations and use that semantic information to guide which paths deserve priority. Second, it adds specialized loop-exit prioritization, allowing the engine to preferentially escape repetitive cycles and progress toward unexplored, riskier territory.
The combination lets the tool sidestep the cyclic trap that snares traditional path prioritization heuristics, focusing exploration effort where it matters most.
Performance Results#
Testing against baseline tools including Empc demonstrated substantial gains:
- Code coverage improved by 42.24% in terms of basic blocks and 125.82% for line coverage
- Total violations discovered reached 1,335, beating the second-best baseline by 32.2%
- Unique violations totaled 87, surpassing Empc by 24.3%
Ablation studies confirmed that both the LLM-based vulnerability marking and loop-exit prioritization contribute meaningfully to results. Stripped-down configurations achieved only 54–61 unique violations, underlining the value of the full approach.

