paperbot · PL 论文追踪

全部论文 待读 收藏

P1 STaint: Detecting Second-Order Vulnerabilities in PHP Applications with LLM-Assisted Bi-Directional Static Taint Analysis

STaint:用LLM辅助的双向静态污点分析检测PHP应用中的二阶漏洞
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 7/10 · 该论文属于用户“AI→PL”方向,即用 LLM 辅助改进静态分析:针对自定义数据库读写与动态查询建模失效问题,将 LLM 语义推理融入双向污点分析,并在真实 PHP 应用上验证,具有问题驱动和工程落地特征。但其应用领域是 Web 安全/PHP 二阶漏洞,未涉及用户更核心的 Agentic 程序、浮点程序分析或贝叶斯程序分析,因此匹配度为中等偏上。引用 0 inbox
Yuchen Ji, Hongchen Cao, Jingzhu He
crossref: 2026-09-12

AI 速览

一句话:提出LLM辅助的双向静态污点分析方法STaint,精确建模自定义数据库读写,检测PHP二阶漏洞。

二阶漏洞(如二阶XSS与SSRF)的成因是用户可控输入先被存入数据库、随后在不同执行上下文中被取出使用,这使静态检测变得困难。现有静态分析方法主要面临两个挑战:一是难以准确识别第三方库或自定义数据访问层中访问数据库的函数,导致污点传播路径遗漏;二是当查询由运行时参数动态构造时,难以对数据库操作进行上下文建模。为此,作者提出STaint,一种将污点分析与大语言模型相结合的双向静态分析方法。它借助LLM的语义推理能力识别并建模自定义的数据库读、写操作,从而完整重建跨数据库的污点数据流。在十个真实PHP应用上的初步评估表明,STaint成功检测出56条二阶漏洞路径,其中包含7个此前未知的漏洞,效果优于现有技术。

问题
二阶漏洞要求跨数据库存取追踪污点,而现有静态分析难以识别自定义/第三方库的数据库访问函数,也难以对动态构造的查询建模。
方法
提出双向静态污点分析框架STaint,利用LLM的语义推理识别并建模自定义数据库读写操作,从而重建完整的跨库污点数据流。
评估
在十个真实PHP应用上开展初步评估,共检测出56条二阶漏洞路径,其中7个为未知漏洞,并与现有技术进行了对比。
原文摘要(Abstract)

Second-Order vulnerabilities, such as second-order Cross-Site Scripting (XSS) and Server-Side Request Forgery (SSRF), occur when user-controlled inputs are stored in databases and later retrieved in different execution contexts, complicating static detection. Existing static analysis approaches struggle primarily with two challenges. First, they struggle in accurately identifying database-accessing functions defined by third-party libraries or custom data access layers, often leading to missed taint propagation paths. Second, they may fail to contextually model database operations when queries are dynamically constructed and depend on runtime parameters. To address these limitations, we propose STaint, a novel bi-directional static analysis method that integrates taint analysis with large language models (LLMs). Using semantic reasoning, STaint accurately identifies and models custom database reads and writes, effectively reconstructing comprehensive taint data flows in the database. Preliminary evaluations on ten real-world PHP applications show that STaint successfully detects 56 second-order vulnerability paths, including 7 previously unknown cases, outperforming existing techniques.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9428,
  title = {STaint: Detecting Second-Order Vulnerabilities in PHP Applications with LLM-Assisted Bi-Directional Static Taint Analysis},
  author = {Yuchen Ji and Hongchen Cao and Jingzhu He},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00347}
}