Security of Language Models for Code: A Systematic Literature Review
Language models for code (CodeLMs) have emerged as powerful tools for code-related tasks, outperforming traditional methods and standard machine learning approaches. However, these models are susceptible to security vulnerabilities, drawing increasing research attention from domains such as software engineering, artificial intelligence, and cybersecurity. Despite the growing body of research focused on the security of CodeLMs, a comprehensive survey in this area remains absent. To address this gap, we systematically review 68 relevant papers, organizing them based on attack and defense strategies. Furthermore, we provide an overview of commonly used language models, datasets, and evaluation metrics, and highlight open-source tools and promising directions for future research in securing CodeLMs.
Authors
- Weisong Sun (ORCID: https://orcid.org/0000-0001-9236-8264)
- Tingxu Han (ORCID: https://orcid.org/0000-0003-1821-611X)
- Zhenpeng Chen (ORCID: https://orcid.org/0000-0002-4765-1893)
- Chunrong Fang (ORCID: https://orcid.org/0000-0002-9930-7111)
- Baowen Xu (ORCID: https://orcid.org/0000-0001-7743-1296)
- Yang Liu (ORCID: https://orcid.org/0000-0001-7300-9215)
- Zhenyu Chen (ORCID: https://orcid.org/0000-0002-9592-7022)
- Yuchen Chen (ORCID: https://orcid.org/0000-0002-3380-5564)
- Quanjun Zhang (ORCID: https://orcid.org/0000-0002-2495-3805)
- Yifei Ge (ORCID: https://orcid.org/0009-0009-0957-854X)
Institutions
- Nanyang Technological University (SG)
- Nanjing University (CN)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2025-08-12
- DOI
- https://doi.org/10.1145/3735554
- Citations
- 4
- Primary Topic
- Advanced Malware Detection Techniques
- Type
- article
- Field-Weighted Citation Impact
- 5.94
Funders
- National Research Foundation
- National Research Foundation Singapore
- National Natural Science Foundation of China
- National Key Research and Development Program of China