LLM identifies hardware security CWEs in Verilog designs
A large language model can detect hardware security vulnerabilities in Verilog code
Systems arXiv 5 Aug 2026 Method Prototype evidence
Published as “LLM-Assisted Detection and Repair of Hardware Security Vulnerabilities in Verilog Designs”
Why it matters
Current LLM-based RTL analysis can aid vulnerability discovery but requires improved prompting and verification to be trustworthy for hardware design workflows.
Summary
The study reports an 84% success rate (27/32 tests passed) in detecting and repairing hardware security bugs in Verilog RTL, but also finds a high false-positive rate on clean modules and frequent testbench generation failures. The LLM correctly identified many CWEs yet often produced ineffective or incorrect testbenches and sometimes altered intended functionality when repairing code. Evidence is limited to a small set of 32 hand-crafted modules; broader evaluation is not provided.
What they found 3
- Overall pass rate of 84% on the test suite
“In total, twenty-seven of the thirty-two total tests conducted resulted in a pass; an 84% success rate.”
- High false-positive rate on modules without vulnerabilities
“Across all five non-vulnerable modules tested, the AI identified at least one vulnerability, despite the modules being intentionally designed without security flaws.”
- Testbench generation frequently failed to validate security properties
“AI-generated testbenches frequently failed to validate the intended security properties of the design.”
Caveats 7
- The LLM misidentified module functionality in several cases, leading to omitted CWE reviews (e.g., misclassifying a Crypto Accelerator).
- Testbenches often produced uninitialized outputs or ineffective tests, preventing meaningful verification.
- Repairs sometimes added unnecessary security mechanisms, altering the original design behavior.
- Limited RTL-specific knowledge and hallucination affect reliability of analysis.
- Testbench generation and verification were frequently ineffective.
- Under-constrained repair prompts led to unnecessary security additions and functional changes.
- Evaluation was performed on a small, manually created set of modules, limiting generalizability.
What’s new here 3
- Introduces a prompting strategy that references prior conversation context to guide LLM reasoning about RTL design rules.
- Combines vulnerability identification, CWE-driven review, and automated code repair within a single iterative framework.
- Evaluates both vulnerable and non-vulnerable Verilog modules to assess false-positive behavior.