ChainAgent: Automated Chainable Vulnerability Discovery in PHP Web Applications
Xinyi Wang, Yeting Li, Shizhe Cui, Jiaming Guo, Qin Mai, Yecheng Sun, Hengyu Yang, Yujie Sun, Huina Chao, Yang Xiao, Feng Li, Wei Huo
Abstract
High-impact attacks on PHP web applications often chain limited-capability vulnerabilities with other flaws or intended behaviors. Discovering these chains requires identifying flaws and the dependencies enabling capability composition. Existing vulnerability discovery techniques analyze flaws in isolation, while attack planning assumes known components. This separation makes it difficult to discover previously unknown components whose security relevance becomes apparent only through their potential roles in an exploit chain. We present ChainAgent, a goal-directed LLM-agent framework that jointly discovers exploit-chain components and their capability dependencies in source code. Guided by an empirical study of 386 real-world web exploit chains, ChainAgent represents vulnerabilities and functional gadgets--intended program behaviors that can be repurposed in attacks--through preconditions and capabilities over security-relevant objects. Instead of discovering vulnerabilities first and constructing attack paths afterward, ChainAgent uses an evolving exploit graph to guide source-code inspection. It searches backward from unmet preconditions for capability producers and forward from discovered capabilities for functional gadgets that consume or amplify them. Object-centered chaining knowledge from our empirical study directs searches toward promising vulnerability classes, functional operations, and object accesses. We evaluate ChainAgent against Codex, a general-purpose coding agent, on 15 PHP applications across three shared LLM backends. ChainAgent achieves 42.02%--44.63% recall for goal-reaching components and recovers up to 4.4 times as many correct goal-reaching dependency edges as Codex. An additional evaluation of 30 real-world PHP applications identifies 20 vulnerabilities and 13 exploit chains, nine of which achieve remote code execution (RCE).
Create a lesson
Related papers
Too Fast to Doubt? Skipping Reasoning Leaves Jev-like Models Vulnerable
Shared title terminology · Yue Li, Hao Wu, Zenan Fu et al.
Mjolnir: Finding and Reproducing Vulnerabilities in Root-of-Trust Firmware and RTL with Project-Grounded Agents
Shared title terminology · Collin MacDonald, Carl Lundin, Stephen Herwig et al.
Suspected Until Inspected: Neuro-Symbolic Detection of Broken Access Control in Server-Side Web Applications
Shared title terminology · Chengyao Yang, Zifeng Kang, Dongqi Han et al.
Railroads as Cyber-Physical Systems: Cybersecurity Implications of Increasing Automation -- Threats, Consequences, and Operational Resilience
Shared title terminology · Syed Owais Athar, Mohsin Kamal, Aemal Khattak et al.
Exploring Early Vulnerability Analysis via Automatic Identification of Vulnerability-Introducing Commits
Shared title terminology · Weiliang Qi, Shu Wang, Youpeng Li et al.
SoK: Assessing the Evolution of LLM Capability in Software Vulnerability Research
Shared title terminology · Amine Lbath, Manan Suri, Aurelien Delaitre et al.