LLMs are increasingly used for code generation, but their outputs often follow recurring templates that can induce predictable vulnerabilities. We study vulnerability persistence in LLM-generated software and introduce 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 the backend or source code. Second, FSTab provides a model-centric evaluation that quantifies how consistently a 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://github.com/fstabicml2026/FSTab
翻译:大语言模型越来越多地被用于代码生成,但其输出通常遵循可预测漏洞的重复模板。我们研究了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://github.com/fstabicml2026/FSTab获取。