LLMs Taking Shortcuts in Vulnerability Detection? SteelYourHeart Benchmark Reveals Misjudgment Risks

SteelYourHeart benchmark reveals the problem of correct conclusions but wrong explanations in LLM vulnerability detection.
SteelYourHeart is the first benchmark to systematically quantify LLM "shortcut-taking" in vulnerability detection: models may judge code as safe merely because it contains a security check, without examining its bypassability. The benchmark contains 195 incomplete fix cases from 136 repositories and uses documented bypass methods to evaluate explanation accuracy. The study found only 36.4%-71.3% of responses correctly identify vulnerabilities and explain bypasses, while conclusion-only accuracy is inflated by 7.7-23.6 percentage points. In patch review, 22 model-case pairs were correct during detection but wrongly approved incomplete patches during review, showing aggregate scores may mask regressions. The study warns that models' reasoning about protection completeness must be strengthened.
Large language models are being widely used for vulnerability detection and security patch review. But a hidden risk follows: models may judge code as safe simply because it contains a security check (guard), without examining whether that check can be bypassed. This "shortcut-taking" behavior can lead to missed detections, letting incomplete fixes slip through. The recently proposed SteelYourHeart benchmark is the first to systematically quantify this problem.

The Blind Spot of Existing Benchmarks: Judging Conclusions, Not Explanations
Many vulnerability detection benchmarks primarily evaluate the correctness of a model's verdict (i.e., whether the code is vulnerable), but rarely test whether the model's explanation accurately characterizes the effectiveness of the security protection. In other words, a model may guess the right answer for the wrong reasons. This evaluation approach cannot distinguish models that truly understand the vulnerability from those that make judgments based on surface features alone.
SteelYourHeart was proposed precisely to fill this gap. It is no longer satisfied with a binary "right or wrong" judgment, but instead requires the model to explain why the protection can be bypassed and to compare that against known bypass methods.
The incompleteness of security patches typically manifests as fixes that cover only known attack vectors without eliminating the root cause. For example, blacklist filtering applied only to specific inputs, which attackers can bypass through encoding transformations; or a fix applied to only a single call path while other paths remain exposed. This kind of "symptom fix" is common in real-world development, because developers often patch against reported exploitation methods rather than comprehensively auditing the protection logic. The SteelYourHeart benchmark leverages such historical incomplete patches as test cases, requiring models to identify the specific paths through which the protection can still be bypassed—thereby testing whether they truly understand the vulnerability mechanism rather than surface patterns.
How Is SteelYourHeart Designed?
The benchmark contains 195 incomplete security fix cases from 136 code repositories. Each case provides the code after the initial fix, along with a documented bypass method as a reference—a bypass that was later closed by a subsequent patch. By matching the model's explanation against the reference bypass, it is possible to objectively score whether the model truly understands the flaw in the protection.
The study evaluated four LLMs, testing the same set of cases under two settings:
- Detection task: Provides the vulnerability category and relevant code, requiring the model to determine whether the code is exploitable and to provide an explanation.
- Patch review task: Additionally provides the changes in the initial patch, simulating a real code review scenario.
This design allows researchers to compare model performance across different contexts and check the consistency of their judgments.
Detection Task: Inflated Conclusion Accuracy
In the detection task, only 36.4% to 71.3% of model responses correctly identified the code as exploitable and explained the reference bypass method. However, if only the verdicts are counted (ignoring explanations), accuracy rises by 7.7 to 23.6 percentage points.
This means that some models, although reaching an "exploitable" conclusion, do not touch on the true bypass path in their explanations. They may simply make judgments based on certain patterns in the code rather than truly understanding why the protection fails. This phenomenon of "correct conclusion, wrong explanation" is exactly the blind spot that is easily overlooked in evaluation.
Patch Review: Aggregate Scores Mask Individual Regressions
In the patch review task, the rate of matching the reference bypass rose to 65.6% to 77.9%. On the surface, models perform better in the review scenario, but researchers found a more subtle problem.
Among 421 model-case pairs, 22 cases were answered correctly in the detection task, yet the same model approved the incomplete patch in patch review. In other words, the model considered the code problematic during detection, but during patch review deemed the fix sufficient—even though that patch was actually incomplete.
This phenomenon reveals the deceptiveness of aggregate scores: an improvement in overall review scores may mask performance regressions on individual fixes. Looking only at the average score may overestimate the model's reliability in real-world review.
Aggregate scores (such as average accuracy or match rate) can be misleading when evaluating models, because they weight cases of different difficulty equally and cannot reflect fluctuations in a model's performance on individual cases. When a model performs well on most easy cases but makes serious errors on a few critical cases (such as incorrectly approving an incomplete patch), the average score may still be high. This kind of "individual regression" is especially dangerous in security review, because a single missed detection can lead to a real vulnerability being introduced. SteelYourHeart, by comparing performance on detection and review tasks case by case, reveals performance regressions masked by aggregate metrics and emphasizes the necessity of fine-grained evaluation.
Implications for AI Security Tool Development
SteelYourHeart's findings raise warnings about the application of LLMs in security. When using models for vulnerability detection or patch review, one cannot rely solely on their verdicts; the accuracy of their explanations must also be verified. When enterprises deploy such tools, they should focus on whether the model truly understands the vulnerability mechanism rather than stopping at surface pattern matching.
In addition, the benchmark provides a direction for improvement for model developers: when training models, it is necessary to strengthen their reasoning about the completeness of security protections, not just learn vulnerability patterns from labeled data.
According to the paper's authors, SteelYourHeart is intended to become a testbed for the final step of vulnerability detection, promoting more rigorous evaluation standards. As LLMs play an increasingly important role in security-critical tasks, this kind of fine-grained evaluation will become indispensable.
One-line Summary
SteelYourHeart benchmark reveals the problem of correct conclusions but wrong explanations in LLM vulnerability detection.
Paragraph Summary
SteelYourHeart is the first benchmark to systematically quantify "shortcut-taking" by LLMs in vulnerability detection: models may judge code as safe merely because it contains a security check, without examining its bypassability. The benchmark contains 195 incomplete fix cases from 136 repositories and uses documented bypass methods to evaluate the accuracy of model explanations. The study found that only 36.4%-71.3% of responses could correctly identify the vulnerability and explain the bypass, while conclusion-only accuracy is inflated by 7.7-23.6 percentage points. In the patch review task, 22 model-case pairs were correct during detection but incorrectly approved incomplete patches during review, indicating that aggregate scores may mask performance regressions. The study warns that models' reasoning about protection completeness needs to be strengthened.
Related articles

5,000 Developers' AI Tool Hijacked: Cursor Version Security Self-Check Guide
About 5,000 developers' AI coding tool hit by supply chain attack via fake extensions injecting SSH keys. Covers affected versions (3-1-2, 3-1-3), timeline, and a three-step remediation plan: uninstall, rotate credentials, run patch script — so you can quickly check if your Cursor is safe.

Cursor AI Practical Guide: Build Apps with AI Even If You Can't Code
Complete Cursor AI tutorial: the VS Code-based AI code editor with built-in Claude, GPT, and Gemini models. Hands-on testing of Tab completion, Agent mode, and Chat, plus who it suits, subscription cost warnings, and the right way to do your first project.

Interface ≠ Harness: The Most Common Conceptual Confusion in AI Coding Tools
AI coding tools often confuse interface with harness. This article explains the difference: the interface is the human interaction layer; the harness is the tools, context, permissions, and sandbox the model uses.