LLMs are increasingly used for code generation, but their outputs often follow recurring templates that can induce predictable vulnerabilities. We study \emph{vulnerability persistence} in LLM-generated software and introduce \emph{Feature--Security Table (FSTab)} with two components. First, FSTab enables a black-box attack that predicts likely backend vulnerabilities from observable frontend features and knowledge of the source LLM, without access to backend code or source code. Second, FSTab provides a model-centric evaluation that quantifies how consistently a given model reproduces the same vulnerabilities across programs, semantics-preserving rephrasings, and application domains. We evaluate FSTab on state-of-the-art code LLMs, including GPT-5.2, Claude-4.5 Opus, and Gemini-3 Pro, across diverse application domains. Our results show strong cross-domain transfer: even when the target domain is excluded from training, FSTab achieves up to 94\% attack success and 93\% vulnerability coverage on Internal Tools (Claude-4.5 Opus). These findings expose an underexplored attack surface in LLM-generated software and highlight the security risks of code generation. Our code is available at: https://anonymous.4open.science/r/FSTab-024E.
翻译:大型语言模型(LLM)越来越多地用于代码生成,但其输出往往遵循可重复的模板,可能引入可预测的漏洞。我们研究了LLM生成软件中的**漏洞持续性**,并提出了包含两个组件的**特征-安全表(FSTab)**。首先,FSTab支持一种黑盒攻击方法,该方法仅通过可观察的前端特征和对源LLM的了解,即可预测后端可能存在的漏洞,而无需访问后端代码或源代码。其次,FSTab提供了一种以模型为中心的评估框架,用于量化给定模型在不同程序、语义保持的重述以及应用领域中重复产生相同漏洞的一致性。我们在包括GPT-5.2、Claude-4.5 Opus和Gemini-3 Pro在内的先进代码LLM上,跨多个应用领域对FSTab进行了评估。我们的结果显示其具备强大的跨领域迁移能力:即使目标领域未包含在训练数据中,FSTab在内部工具(Claude-4.5 Opus)上仍能达到高达94%的攻击成功率和93%的漏洞覆盖率。这些发现揭示了LLM生成软件中一个尚未被充分探索的攻击面,并凸显了代码生成带来的安全风险。我们的代码公开于:https://anonymous.4open.science/r/FSTab-024E。