Existing benchmarks for LLM-based vulnerability detection compress model performance into a single metric, which fails to reflect the distinct priorities of different stakeholders. For example, a CISO may emphasize high recall of critical vulnerabilities, an engineering leader may prioritize minimizing false positives, and an AI officer may balance capability against cost. To address this limitation, we introduce SecLens-R, a multi-stakeholder evaluation framework structured around 35 shared dimensions grouped into 7 measurement categories. The framework defines five role-specific weighting profiles: CISO, Chief AI Officer, Security Researcher, Head of Engineering, and AI-as-Actor. Each profile selects 12 to 16 dimensions with weights summing to 80, yielding a composite Decision Score between 0 and 100. We apply SecLens-R to evaluate 12 frontier models on a dataset of 406 tasks derived from 93 open-source projects, covering 10 programming languages and 8 OWASP-aligned vulnerability categories. Evaluations are conducted across two settings: Code-in-Prompt (CIP) and Tool-Use (TU). Results show substantial variation across stakeholder perspectives, with Decision Scores differing by as much as 31 points for the same model. For instance, Qwen3-Coder achieves an A (76.3) under the Head of Engineering profile but a D (45.2) under the CISO profile, while GPT-5.4 shows a similar disparity. These findings demonstrate that vulnerability detection is inherently a multi-objective problem and that stakeholder-aware evaluation provides insights that single aggregated metrics obscure.
Figures & tables
Role
Core Decision Question
CISO
“Can I trust this model in my security program?”
CAIO / Head of AI
“Which model unlocks new capabilities while balancing risk and cost?”
Security Researcher
“Does this model genuinely understand vulnerability mechanics?”
Head of Engineering
“Will this help or hurt my team’s velocity and code quality?”
AI as Actor
“Does the agent know what it can and can’t do?”
Table 1: Stakeholder roles and their core evaluation questions.
Figure 1: Category-level weight distribution for the five stakeholder roles. Each axis represents one of the 7 measurement categories (weights sum to 80 per role).
ID
Category
Dimensions
A
Detection
D1–D8
B
Coverage & Consistency
D9–D13
C
Reasoning & Evidence
D14–D17
D
Operational Efficiency
D18–D23
E
Tool-Use & Navigation
D24–D27
F
Risk & Severity
D28–D30
Table 2: Seven measurement categories and their constituent dimensions.
Category
CISO
CAIO
Researcher
Head Eng.
AI Actor
A: Detection
34
16
39
35
17
B: Coverage & Consistency
15
4
16
7
7
C: Reasoning & Evidence
4
1
21
0
2
D: Operational Efficiency
2
19
0
22
0
E: Tool-Use & Navigation
0
15
0
0
18
F: Risk & Severity
18
5
0
0
0
Table 3: Category-level weight distribution across roles (weights sum to 80 per role).
ID
Name
Category
Description
Norm.
D1
MCC
Detection
Matthews Correlation Coefficient [ 26 , 3 ] ; balanced metric robust to class imbalance
M
D2
Recall
Detection
True positive rate; fraction of vulnerable code correctly flagged
R
D3
Precision
Detection
Positive predictive value; fraction of “vulnerable” verdicts that are correct
R
D4
F1
Detection
Harmonic mean of precision and recall
R
D5
True Negative Rate
Detection
Specificity; fraction of non-vulnerable code correctly cleared
R
D6
CWE Accuracy
Detection
Correct CWE-ID among true positive detections
R
Table 4: Master dimension catalog (35 dimensions). Strategy: R = Ratio, M = MCC, L = Lower-is-better, H = Higher-is-better.
Table 11: Vulnerability category distribution (TP + Post-Patch).
Model
CIP Score (%)
CIP Cost
TU Score (%)
TU Cost
Gemini 3 Flash Preview
49.6
$15.87
44.2
$184.21
Gemini 3.1 Pro Preview
48.2
$44.81
45.8
$639.09
Claude Sonnet 4.6
47.6
$6.76
42.1
$359.76
Kimi K2.5
46.8
N/T
–
–
Gemini 2.5 Pro
46.2
$13.45
35.2
$57.91
Grok Code Fast 1
44.1
N/T
34.4
N/T
Table 12: Full leaderboard across CIP and TU layers, sorted by CIP score. Cost shown where tracked; N/T = not tracked.
Model
LB %
CISO
CAIO
Researcher
Head Eng.
AI Actor
Gemini 3 Flash Preview
49.6
B (73.3)
B (68.1)
B (71.0)
B (66.2)
A (87.5)
Gemini 3.1 Pro Preview
48.2
B (67.5)
B (67.0)
B (65.7)
B (63.8)
A (85.7)
Claude Sonnet 4.6
47.6
B (65.7)
B (68.4)
B (64.2)
B (73.9)
A (85.6)
Kimi K2.5
46.8
B (68.0)
B (67.8)
B (67.0)
B (65.1)
A (86.4)
Gemini 2.5 Pro
46.2
B (66.2)
B (67.9)
B (65.2)
B (71.3)
A (86.3)
Grok Code Fast 1
44.1
C (58.7)
B (67.5)
B (60.2)
B (73.0)
A (83.8)
Table 13: Per-role Decision Scores (CIP layer). Grade thresholds: A ≥ 75, B ≥ 60, C ≥ 50, D ≥ 40, F < 40. Sorted by leaderboard score (LB).
Figure 2: Per-role Decision Scores for 12 models (CIP layer). Dashed lines mark grade thresholds: A ≥ 75, B ≥ 60, C ≥ 50. Models sorted by leaderboard score (left to right).
Category
#1 (F1)
#2 (F1)
#3 (F1)
Worst (F1)
Broken Access Ctrl.
Kimi K2.5 (0.667)
Gemini 3.1 Pro (0.660)
Gemini 3 Flash (0.647)
Qwen3-Coder (0.128)
Cryptographic Failures
Gemini 3 Flash (0.676)
Gemini 3.1 Pro (0.667)
Haiku 4.5 (0.633)
Qwen3-Coder (0.118)
Auth Failures
Kimi K2.5 (0.585)
Gemini 2.5 Pro (0.579)
Gemini 3.1 Pro (0.578)
Opus 4.6 (0.000)
Input Validation
Haiku 4.5 (0.675)
Kimi K2.5 (0.649)
Gemini 2.5 Flash (0.638)
Qwen3-Coder (0.125)
Injection
Gemini 3.1 Pro (0.632)
Gemini 3 Flash (0.618)
Gemini 2.5 Flash (0.603)
Qwen3-Coder (0.062)
Memory Safety
Haiku 4.5 (0.690)
Gemini 3 Flash (0.667)
Gemini 2.5 Flash (0.640)
Qwen3-Coder (0.308)
Table 14: Per-category F1 leaders and worst performers (CIP layer).
Model
BAC
Crypto
Auth
Input
Inj.
Mem.
SSRF
D.Int.
Avg
Gemini 3 Flash
0.647
0.676
0.444
0.627
0.618
0.667
0.667
0.680
0.628
Claude Haiku 4.5
0.586
0.633
0.545
0.675
0.507
0.690
0.667
0.679
0.623
Gemini 3.1 Pro
0.660
0.667
0.578
0.618
0.632
0.583
0.600
0.500
0.605
Kimi K2.5
0.667
0.567
0.585
0.649
0.517
0.609
0.644
0.529
0.596
Gemini 2.5 Pro
0.635
0.562
0.579
0.627
0.585
0.526
0.643
0.514
0.584
Claude Sonnet 4.6
0.590
0.625
0.514
0.571
0.518
0.526
0.690
0.537
0.571
Table 15: F1 score by model and vulnerability category (CIP layer). Bold indicates best-in-category. Italics indicates worst. Models sorted by average F1.
Figure 3: F1 score heatmap by model and vulnerability category (CIP layer). Models sorted by average F1. Green = strong, red = weak.
Model
RDI
Best Role
Worst Role
Qwen3-Coder
31.1
AI Actor (77.9)
CISO (45.2)
GPT-5.4
30.8
AI Actor (79.2)
CISO (48.4)
Qwen3-Plus
30.1
AI Actor (81.2)
CISO (51.1)
Opus 4.6
29.2
AI Actor (80.2)
CISO (51.0)
Grok Code Fast
25.1
AI Actor (83.8)
CISO (58.7)
Gemini 2.5 Flash
23.6
AI Actor (84.9)
Researcher (61.1)
Table 16: Role Divergence Index (CIP layer). Highest and lowest scoring roles shown.
Figure 4: Role Divergence Index per model (CIP layer). Red = high divergence ( ≥ 28), yellow = moderate ( ≥ 22), blue = low. Higher RDI means the model’s value depends more on stakeholder perspective.
Model
LB %
CISO
CAIO
Researcher
Head Eng.
AI Actor
Gemini 3.1 Pro Preview
45.8
B (69.4)
C (56.1)
B (65.0)
D (44.5)
A (75.4)
Gemini 3 Flash Preview
44.2
B (68.9)
C (55.9)
B (64.1)
D (44.5)
B (73.7)
Claude Sonnet 4.6
42.1
B (66.3)
C (56.1)
B (60.6)
D (43.9)
B (74.7)
Claude Opus 4.6
39.0
C (56.0)
C (55.6)
C (53.9)
D (43.8)
B (71.7)
Claude Haiku 4.5
37.8
B (66.5)
C (57.1)
B (60.3)
D (47.8)
B (72.8)
Gemini 2.5 Pro
35.2
C (59.7)
B (64.4)
C (55.2)
C (52.0)
A (79.7)
Table 17: Per-role Decision Scores (TU layer). Grade thresholds: A ≥ 75, B ≥ 60, C ≥ 50, D ≥ 40, F < 40. Sorted by TU leaderboard score.
Large language models are increasingly used for vulnerability detection, yet their reliability under different prompt formulations remains uncharacterized. We present PromptAudit, a controlled evaluation framework that isolates prompt effects by fixing the dataset, decoding, and parsing while varying only the prompting strategy. Using five prompting strategies across five open-weight models on 1,000 CVEs (6,074 code samples spanning 16 programming languages), we evaluate accuracy, recall, abstention, coverage, and effective F1. We find that standard chain-of-thought prompting achieves the strongest overall operational performance, while few-shot prompting provides model-dependent benefits that are most pronounced for prompt-sensitive models. In contrast, adaptive chain-of-thought frequently suppresses recall and self-consistency induces excessive abstention, sharply reducing effective performance. These results show that vulnerability detection behavior is jointly determined by the model and the prompt, and that prompt sensitivity is a first-class system property that must be explicitly characterized in evaluation and deployment.
Steffen J. Camarato, Yahya Hmaiti, Mandana Ghadamian +1
University of Central Florida Orlando, Florida, USA
Whether LLMs scoring well on vulnerability benchmarks genuinely reason about security or merely pattern-match on contaminated data remains unresolved. We present CWE-Trace, a framework for LLM vulnerability detection built from 834 manually curated Linux kernel samples spanning 74 CWEs. The framework enforces a strict temporal split (pre-2025 historical set / post-cutoff leakage-free set), preserves context-aware vulnerable--patched pairs, and introduces two diagnostic metrics: the Directional Failure Index (DFI) and Hierarchical Distance and Direction (HDD). We evaluate eight vanilla LLMs and 15 LoRA fine-tuned variants across non-targeted detection, targeted detection, and CWE classification. Our analysis yields two key results. First, data contamination provides no measurable advantage. Function-level analysis shows that 84% of nominally contaminated samples carry no usable memorization signal: vulnerable functions are absent or cross-mapped across datasets, and ~31% of contaminated samples carry CWE misclassification. Second, backbone directional priors dominate fine-tuning. Models exhibit stable, systematic failure modes (DFI ranging from -85.5 to +94.8 pp) that persist from historical to post-cutoff data and resist correction. Fine-tuning shifts the output threshold without changing the decision policy. This is calibration without comprehension: output distributions adapt to training data while the underlying security reasoning remains absent. The weakest backbone at binary detection (DeepSeek-R1) gains the most in coarse CWE classification, revealing that detection and understanding are decoupled capabilities. The best detection score reaches only 52.1% (+2.1 pp above chance); exact CWE ranking remains below 1.3% Top-1 accuracy, confirming that current LLMs lack reliable security reasoning for systems software, regardless of fine-tuning strategy.
Arastoo Zibaeirad, Marco Vieira
University of North Carolina at Charlotte, Charlotte, NC, USA
Researchers and practitioners increasingly apply Large Language Models (LLMs) for automated vulnerability detection. Recent work has shown that LLMs are susceptible to the same cognitive heuristics that bias human judgment. Yet, no work has investigated whether these heuristics affect a model's assessment of code vulnerabilities. In this paper, we present the first systematic exploration of cognitive heuristics in LLM-driven code vulnerability detection. We introduce a controlled framework that holds the code fixed and only varies the surrounding context to trigger three cognitive heuristics: the halo effect through author attribution, the framing effect through task objectives and consequences, and the anchoring effect through prior analysis results. Within this framework, we evaluate eight LLMs across three programming languages. Our results demonstrate that all evaluated models are susceptible to these heuristics. Cross-model average susceptibility is highest for framing at 33.2%, followed by anchoring at 23.5% and halo at 18.4%. Vulnerabilities that require semantic reasoning for detection are more susceptible to cognitive heuristics than those identifiable through pattern matching. Furthermore, models often change their verdict from safe to vulnerable based on the cognitive condition, without accurately identifying the actual vulnerability. To highlight the practical impact, we demonstrate a proof-of-concept black-box cognitive attack that can suppress up to 97% of previously detected vulnerabilities. Together, these findings show that cognitive bias is a consistent and exploitable property of LLM-based vulnerability detection.
Asif Shahriar, Hongyu Cai, Hadjer Benkraouda +2
BRAC University · Purdue University · University of Illinois Urbana-Champaign