Lune

EMNLP2024Top-tier venue

RealVul: Can We Detect Vulnerabilities in Web Applications with LLM?

Di Cao, Yong Liao, Xiuwei Shang

Abstract

The latest advancements in large language models (LLMs) have sparked interest in their potential for software vulnerability detection. However, there is currently a lack of research specifically focused on vulnerabilities in the PHP language, and challenges in extracting samples and processing persist, hindering the model's ability to effectively capture the characteristics of specific vulnerabilities. In this paper, we present RealVul, the first LLM-based framework designed for PHP vulnerability detection, addressing these issues. By vulnerability candidate detection methods and employing techniques such as normalization, we can isolate potential vulnerability triggers while streamlining the code and eliminating unnecessary semantic information, enabling the model to better understand and learn from the generated vulnerability samples. We also address the issue of insufficient PHP vulnerability samples by improving data synthesis methods. To evaluate RealVul's performance, we conduct an extensive analysis using five distinct code LLMs on vulnerability data from 180 PHP projects. The results demonstrate a significant improvement in both effectiveness and generalization compared to existing methods, effectively boosting the vulnerability detection capabilities of these models.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Impact of Code Language Models on Automated Program Repair cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CTX-Coder: Cross-Attention Architectures Empower LLMs for Long-Context Vulnerability Detection cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Data Quality for Software Vulnerability Datasets cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. CTX-Coder: Cross-Attention Architectures Empower LLMs for Long-Context Vulnerability DetectionJujie Wang, Kangfeng Zheng, Bin Wu, Chunhua Wu et al.AAAI 2026

Builds on9

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  3. CodeT5+: Open Code Large Language Models for Code Understanding and GenerationYue Wang, Hung Le, Akhilesh Gotmare, Nghi D. Q. Bui et al.EMNLP 2023 · 339 citations
  4. Impact of Code Language Models on Automated Program RepairNan Jiang, Kevin Liu, Thibaud Lutellier, Lin TanICSE 2023 · 164 citations
  5. Data Quality for Software Vulnerability DatasetsRoland Croft, Muhammad Ali Babar, M. Mehdi KholoosiICSE 2023 · 138 citations

Related papers

  1. Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning DataXin-Cheng Wen, Yijun Yang, Cuiyun Gao, Yang Xiao et al.ACL Findings 2025 · 2 citations
  2. Enhancing Vulnerability Detection via Inter-procedural Semantic CompletionBozhi Wu, Chengjie Liu, Zhiming Li, Yushi Cao et al.ISSTA 2025 · 2 citations
  3. Generalization-Enhanced Code Vulnerability Detection via Multi-Task Instruction Fine-TuningXiaohu Du, Ming Wen, Jiahao Zhu, Zifan Xie et al.ACL Findings 2024 · 37 citations
  4. From Large to Mammoth: A Comparative Evaluation of Large Language Models in Vulnerability DetectionJie Lin, David MohaisenNDSS 2025
  5. LLM-based Vulnerability Discovery through the Lens of Code MetricsFelix Weissberg, Lukas Pirch, Erik Imgrund, Jonas Möller et al.ICSE 2026
Dusk over the sea between two cliffs drawn in fine vertical lines