Examining Zero-Shot Vulnerability Repair with Large Language Models
The DOI matches its Crossref record; 43 of the 43 references it cites were found in a registry or an index.
Abstract
Human developers can produce code with cybersecurity bugs. Can emerging ‘smart’ code completion tools help repair those bugs? In this work, we examine the use of large language models (LLMs) for code (such as OpenAI’s Codex and AI21’s Jurassic J-1) for zero-shot vulnerability repair. We investigate challenges in the design of prompts that coax LLMs into generating repaired versions of insecure code. This is difficult due to the numerous ways to phrase key information— both semantically and syntactically—with natural languages. We perform a large scale study of five commercially available, black-box, "off-the-shelf" LLMs, as well as an open-source model and our own locally-trained model, on a mix of synthetic, hand-crafted, and real-world security bug scenarios. Our experiments demonstrate that while the approach has promise (the LLMs could collectively repair 100% of our synthetically generated and hand-crafted scenarios), a qualitative evaluation of the model’s performance over a corpus of historical real-world examples highlights challenges in generating functionally correct code.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“That said, LLMs may also generate secure code as a replacement for insecure code [27] (i.e. may be used for bug patches). Although this was only shown to reliably work for small synthetic examples rather than for case studies taken from real-world vulnerabilities, where the results were inconclusive”
From Lost at C: A User Study on the Security Implications of Large Language Model Code Assistants (2022) · cites this paper as [27]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Language Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 2×
“LLMs trained on large corpora of data can inadvertently gain some ability to perform multiple tasks, even in a “zeroshot” setting [5], [6].”
BackgroundKaugeranna, R., Kaugeranna, E., & Aion, (. S. 4. 6. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.giscience.2023.43 · Cited by 13,690
2017 USENIX Annual Technical Conference (USENIX ATC'17)
Quoc, D. L., Beck, M. S., Bhatotia, P., Chen, R., Fetzer, C. W., & Strufe, T. (2017) · Cited by 3,091
Evaluating Large Language Models Trained on Code
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021) · arXiv · doi:10.48550/arxiv.2107.03374 · Cited by 1,436 · cited 8×
“These include OpenAI’s Codex models [1], AI21’s Jurassic-1 models [8], [25], and the ‘polycoder’ model [26].”
BackgroundMethodInfluentialGenProg: A Generic Method for Automatic Software Repair
Le Goues, C., Nguyen, T., Forrest, S., & Weimer, W. (2012) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2011.104 · Cited by 1,085 · cited 3×
“NMT-based approaches steer clear of problems due to “overfitting” test suites [41], a pitfall of generate-and-validate approaches for patch generation (e.g., the seminal GenProg [42]).”
BackgroundInfluentialSimplifying and isolating failure-inducing input
Zeller, A., & Hildebrandt, R. (2002) · IEEE Transactions on Software Engineering · doi:10.1109/32.988498 · Cited by 1,079
Evaluating large language models trained on code
Chen, M. (2024) · TIB Data Manager · doi:10.57702/wbv3e61b · Cited by 737
AddressSanitizer: a fast address sanity checker
Serebryany, K., Bruening, D. L., Potapenko, A., & Vyukov, D. (2012) · USENIX Annual Technical Conference · Cited by 724
A new algorithm for data compression
Gage, P. (1994) · C/C++ users journal · doi:10.5555/177910.177914 · Cited by 700
A systematic evaluation of large language models of code
Xu, F. F., Alon, U., Neubig, G., & Hellendoorn, V. J. (2022) · Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming · doi:10.1145/3520312.3534862 · Cited by 540
Research works printed but not linked: 7
- GitHub Copilot • Your AI pair programmer. Github,
- Discover Use Cases for AI21 Studio and Jurassic-1. AI21.
- Completion -OpenAI API. Openai,
- Jurassic-1: Technical Details and Evaluation. O Lieber, O Sharir, B Lentz, Y Shoham, I21
- Source Code Analysis Tools. OWASP.
- Examples -OpenAI API. Openai,
- What would other programmers do: suggesting solutions to error messages. B Hartmann, D Macdougall, J Brandt, S R Klemmer, Proceedings of the 28th international conference on Human factors in computing systems -CHI '10. the 28th international conference on Human factors in computing systems -CHI '10Atlanta, Georgia, USAACM Press20101019
Cited by
Items 601–663 of 663
Stirewalt, T., Hodgson, S., Tahiru, P., & Gebremedhin, A. H. (2026) · Digital Commons - University of South Florida (University of South Florida) · doi:10.5038/2378-0789.9.1.1153
Hybrid backdoor attacks for deep code models
Geng, T. (2025) · PLoS ONE · doi:10.1371/journal.pone.0338083
“Pearce et al. [18] systematically studied the prevalence of unsafe code recommendations from GitHub Copilot and the reasons behind it.”
Method of Static Analysis of Program Source Code Using Large Language Models
Vokhranov, I. (2026) · Електронний архів наукових та освітніх матеріалів КПІ ім. Ігоря Сікорського (КПІ ім. Ігоря Сікорського)
AttackLLM: LLM-Guided Attack Synthesis for Accelerated Formal Analysis of Security Protocols
Dong, X., Wang, Z., He, M., Xiao, K., Liu, S., Zhiqiang, L., Zhou, R., & Cheng, Q. (2026) · Lecture notes in computer science · doi:10.1007/978-981-92-7678-3_3
Python Code Verification and Improvement Using Large Language Models
李, 宗. (2025) · JAIST Repository
LLM4Trust: Exploring the Capabilities of Large Language Models for Trust EvaluationPreprint
Wang, J., Sun, Y., Yan, Z., Lan, J., & Bertino, E. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2609.33521
“Following OpenAI’s documentation [72] and prior studies [56], [73], we fix top p at its default value of 1.0 and vary temperature to identify the settings that Efficiency Comparison.”
InfluentialGuan, S., Hou, Q., Chen, Y., Wen, X., Feng, J., Lian, K., & Gao, C. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2608.09181
“More recently, general-purpose LLMs such as GPT-4o [15] have been applied to vulnerability detection, program repair, and security auditing [43], [44].”
Hey, ChatGPT, look at my work : using conversational AI in requirements engineering education
Tegegn, M. (2025) · cIRcle (University of British Columbia) · doi:10.14288/1.0450984
Towards Demystifying and Repairing LLM-in-the-Loop VulnerabilitiesPreprint
Ma, Y., Rong, J., Yang, C., Quan, L., Wen, J., Xie, X., Lyu, Y., & Hu, Q. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2605.28893
“First, the overall repair success rate of current LLM-based agents on LLM-in-the-loop vulnerabilities remains limited.”
InfluentialDemonstrating Code Mutations Using LLMs: A Sandbox Approach to Safe Malware Testing
Indhuja, E., Ashik.J.S, N., Dheeraj., K., & Prakash.V, S. (2026) · International Conference on Multi-Agent Systems for Collaborative Intelligence (ICMSCI) · doi:10.1109/icmsci67830.2026.11469278
Evaluation of Generative AI-Enabled Cyber Attack Vectors
Munirathnam, S. (2026) · International Journal of Computer Applications · doi:10.5120/ijca2026926540
BACGUARD: Fact-Grounded Runtime Mitigation of Broken Access ControlPreprint
Ndebugre, M. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2611.10157
Fine-Grained Reasoning Enhanced Vulnerability Patch Generation with Multi-View Fix Knowledge
Shao, M., Ding, Y., Zhu, G., Gao, C., & Xiao, Y. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3861081
Exploring Large Language Models’ Capabilities in Software Engineering
Ságodi, Z. (2026) · SZTE Repository of Dissertations (University of Szeged)
Automated Vulnerability Patching in Legacy Code Using LLMs and Multi-AI Agents
Verma, H. (2025) · International Journal of Scientific Research and Management (IJSRM) · doi:10.18535/ijsrm/v14i04.ec05
Repairing Broken Access Control in Web Applications with LLMs: An Empirical Benchmark StudyPreprint
Liu, M., He, L., Wang, X., Li, Y., Han, D., Li, Y., & Liu, Y. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2610.34290
(2026) · International Journal of Progressive Research in Engineering Management and Science · doi:10.58257/ijprems55167
CVE-Genie : An LLM-Based Multi-Agent Framework for Reproducing CVEs
Ullah, S., Balasubramanian, P., Guo, W., Burnett, A., Pearce, H. A., Kruegel, C., Vigna, G., & Stringhini, G. (2026) · ACM SIGSAC Conference on Computer and Communications Security (CCS) · doi:10.1145/3830454.3832602
Self-citationDeepAVR: Deep Analysis via Multi-Agent Collaboration for Automated Vulnerability RepairPreprint
Han, W., Kim, H., Lee, B. J., Kim, K., Lee, Y., Moon, H., & Paek, Y. (2026) · arXiv · doi:10.48550/arxiv.2610.32345
EviRepair: Evidence-Driven Agents for Reliable Vulnerability RepairPreprint
石谊联, Liu, Q., Zhou, T., Tan, W., Si, C., Lyu, Y., Hu, X., & Liu, D. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2610.13491
Farhad, M., Rahman, S., & Dass, S. (2026) · SuperIntelligence - Robotics - Safety & Alignment · doi:10.70777/si.v3i2.18033
PAVR: A Pre-Training Approach with Self-attention for Vulnerability Repair
Peng, K., Fu, Y., Yang, J., Yi, W., Cao, J. P., & Li, H. (2024) · Communications in computer and information science · doi:10.1007/978-981-97-4522-7_30
Efforts to Improve and Utilize Security Transparency in Software Supply Chains
Wada, Y., & Arakawa, R. N. (2024) · NTT technical review · doi:10.53829/ntr202411fa9
Abdulkadir, H., Buhari, B. A., & Umar, A. (2025) · Journal of Computers and Digital Business · doi:10.56427/jcbd.v4i1.629
“Pearce et al. in [3] investigated the application of large language models (LLMs) for code for zero-shot vulnerability repair, such as AI21's Jurassic J-1 and OpenAI's Codex.”
Identifying software vulnerabilities via code representation learning
Wu, B. (2025) · DR-NTU (Nanyang Technological University) · doi:10.32657/10356/182636
A Mask Optimization Method for Automated Vulnerability Repair
Li, J.-L., Lei, Y., & Qin, F. (2025) · International Symposium on Computer Applications and Information Systems (ISCAIS) · doi:10.1109/iscait64916.2025.11010430
“During the beam search process, we evaluate all methods with beam sizes ∈ [1, 3, 5, 7].”
Enhancing Binary Analysis Tooling
Wong, W. K. (2025) · doi:10.14711/thesis-hdl152684
Deteção e Correção Automática de Vulnerabilidades Recorrendo a Large Language Models
Santos, D. J. O. (2024) · Portuguese National Funding Agency for Science, Research and Technology (RCAAP Project by FCT)
Knowledge Graph-Driven Identification of Security Weaknesses in Web-Based Software ArchitecturesPreprint
Vergara-Vargas, J., Tibermacine, C., Restrepo‐Calle, F., & Sadou, S. (2026) · SSRN Electronic Journal · doi:10.2139/ssrn.6381013
VERIGATE: A VERIFICATION GATE-BASED NEUROSYMBOLIC METHOD FOR STATIC CODE ANALYSIS
Vokhranov, I., & Bulakh, B. (2026) · Наука і техніка сьогодні · doi:10.52058/2786-6025-2026-2(56)-1488-1507
Xiang, Z., Gao, Y., Hu, W., Li, G., Yang, X., & Zhang, Q. (2026) · International Journal of Pervasive Computing and Communications · doi:10.1108/ijpcc-11-2025-0490
INFRASTRUCTURE-AS-CODE SECURITY AND DRIFT DETECTION USING LLMS
Movva, D. K., Pullikallu, A. R., & Sugasi, M. K. (2025) · doi:10.34218/ijcst_02_01_002
Evidence-Constrained Explainable Malware Detection Using Large Language Models
Kar, T. S., Shihab, M. F. A., Patwary, H. U., Karim, H. R., & Sami, M. F. T. (2026) · IEEE International Conference on Quantum Photonics, Artificial Intelligence & Networking (QPAIN) · doi:10.1109/qpain69676.2026.11546322
“Applications of large language models include vulnerability fixing [14], exploit development [15], threat analysis [18], assembly analysis [21], and phishing identification [22].”
AI-Augmented DevSecOps Pipeline for Intelligent Vulnerability Triage: Integrating SonarQube with LLM
Wu, S., Tan, T.-H., Liu, S.-H., & Chen, C.-R. (2026) · Lecture notes on data engineering and communications technologies · doi:10.1007/978-3-032-23347-9_14
Wang, C., & Meng, W. C. (2026) · IEEE Symposium on Security and Privacy (S&P) · doi:10.1109/sp63933.2026.00237
“…have demonstrated promising capabilities in vulnerability analysis and automated repair, existing research has primarily focused on native binaries and compiled languages [24, 27, 36, 38], with limited applicability to dynamic interpreted languages, which are commonly used in web development.”
Knowledge Over Parameters: Evolving Smart Contract Vulnerability DetectionPreprint
Sun, Y., Liu, H., Li, Y., Zhang, Y., Cao, Z., Guo, Z., & Liu, Y. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2607.01742
Large Language Model powered Test Driver Generation for High-performance Computing Library
He, Z., Zhang, G., Liu, M., & Chen, Z. (2026) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3786582.3786815
“Our method leverages the domain knowledge embedded in large language models [18] 1 void cblas_sgemm(”
Muppidi, N. K. R., Divi, V. R., Gullapalli, S., & Pasumarthy, R. (2026) · International Conference on Ubiquitous and Future Networks · doi:10.1109/icufn69619.2026.11628716
“The closest research threads are automated code review [7], [8], LLM-assisted security repair [12], and software architecture reconstruction [9], [10].”
Joshua, J. S., & Shanmuganeethi, V. (2026) · International Journal for Research in Applied Science and Engineering Technology · doi:10.22214/ijraset.2026.84782
Автоматизація аналізу безпеки коду на основі генеративного штучного інтелекту
Фіглярський, І. А., & Kupershtein, L. M. (2026) · Repository of Vinnytsia National Technical University (Vinnytsia National Technical University)
Sindhu, V., Joshua Anto, A., Midhrujayan, K., Adithya, R. M. N., & Ramraj, S. (2026) · International Conference on Smart Systems for Electrical, Electronics, Communication and Computer Engineering (ICSSEECC) · doi:10.1109/icsseecc69062.2026.11722165
“Large language models (LLMs) have been investigated for generating remediation code [21], repairing C-level security vulnerabilities through transfer learning [22], and automatically fixing Kubernetes misconfigurations using retrieval-augmented generation, as demonstrated by LLMSecConfig [23].”
Lv, Y., & Wang, C. (2026) · Computers, materials & continua/Computers, materials & continua (Print) · doi:10.32604/cmc.2026.092642
Chatla, P. R., & Sree, S. R. (2026) · International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC) · doi:10.1109/i-smac70384.2026.11747307
“The below are security requirements needed for AI-specific systems [4]: • Protection of sensitive data: AI systems process enormous amounts of sensitive data, including personal, medical, and financial information.”
Tayade, A. V. D. A. R., Wable, A. M., & Thakare, S. S. B. M. S. (2026) · International Journal of Advanced Research in Science Communication and Technology · doi:10.48175/ijarsct-40460
AI-Powered Penetration Testing and Vulnerability Remediation for GitHub Repositories
Mrs. Bindu, K. P., Gagana, R., R, K. K., Sahana, M. G., & Pramod, M. H. (2026) · IJARCCE · doi:10.17148/ijarcce.2026.1510146
AI-Powered Code Review Assistant
Ganvir, D. H., Aneesh, A. S., Bhoge, H., Kubade, S., & Shamkuwar, U. (2026) · INTERANTIONAL JOURNAL OF SCIENTIFIC RESEARCH IN ENGINEERING AND MANAGEMENT · doi:10.55041/ijsrem68630
LLM-Augmented SAST Reports for Android: A Pilot Human Study of Vulnerability Triage
Binikos, P., & Sai, A. (2026) · IEEE International Conference on Cyber Security and Resilience (CSR) · doi:10.1109/csr69374.2026.11759919
Safe by Accident: Crash-Testing LLM-Written CodePreprint
Mahmud, A., Rahman, M. A.-A., & Shahriyar, R. (2026) · arXiv · doi:10.48550/arxiv.2611.10585
Ghifiardi, R., & Rachman, R. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2611.10425
The Illusion of Rust Safety: Detecting Modular Unsafe Functions with LLMs
Cheng, X., Sang, F., Yang, Y., Zhang, H., Park, S., Zhang, X., & Kim, T. (2026) · ACM SIGSAC Conference on Computer and Communications Security (CCS) · doi:10.1145/3830454.3832709
TRACE: Patch-Aware Retrieval-Augmented Reasoning for High-Recall Vulnerability TriagePreprint
Zhang, D., Ju, X., Gao, Z., Chen, X., & Gong, L. (2026) · Research Square · doi:10.21203/rs.3.rs-11482209/v1
Cao, Z., Ding, W., & Xu, B. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2611.17123
AI-Assisted Patch-Latency SLO Enforcement for Hardened Container Base Image Supply Chains
Muppidi, N. K. R., Gullapalli, S., Sabnis, Y., Gupta, S., & Nagaraj, P. B. (2026) · doi:10.1109/gaiss66401.2026.11779592
ChangeGuard-AI: Control-Aware Generative Review of Security Infrastructure Changes
Gatla, V., & Shrivastava, P. (2026) · doi:10.1109/gaiss66401.2026.11779684
Siddhu, H. S., Dhole, A., & Kathi, S. R. (2026) · doi:10.1109/gaiss66401.2026.11779561
Mohammed, A. R., AKKISETTI, S. R., MISHRA, N. A., & GUDIPATI, S. K. (2026) · doi:10.1109/gaiss66401.2026.11779618
A Multi-Agent Generative AI Framework for Secure Enterprise Software Engineering
Mohammed, A. R., AKKISETTI, S. R., MISHRA, N. A., & GUDIPATI, S. K. (2026) · doi:10.1109/gaiss66401.2026.11779644
Threat Landscape of Vibe Coding and the Road to Secure AutonomyPreprint
Jha, D. N., Anand, S., Krishnaiah, K. K., Ahearn, R., & Nale, S. (2026) · arXiv · doi:10.48550/arxiv.2611.21822
Missing Security-Fix Backporting for GitHub Actions WorkflowsPreprint
Ma, C., Shi, J., Han, R., Sun, W., Niu, Y., Lyu, Y., Yang, Z., & Lo, D. (2026) · arXiv · doi:10.48550/arxiv.2611.22519
Vulnerability in the vulnerability checker: A critical review of LLMs in security systems
Dong, H., Himeur, Y., Hammoudeh, M. A. A., Dong, S., & Ala’anzy, M. A. (2026) · Array · doi:10.1016/j.array.2026.101449
"It's Weird That it Knows What I Want": Usability and Interactions with Copilot for Novice Programmers
Prather, J., Reeves, B. N., Denny, P., Becker, B. A., Leinonen, J., Luxton-Reilly, A., Powell, G., Finnie-Ansley, J., & Santos, E. A. (2023) · arXiv
“While they found that these models were able to repair 100% of synthetic example vulnerabilities, their performance was not as good with real-world examples [66].”
Background
Metadata
- Authors
- Pearce, H., Tan, B., Ahmad, B., Karri, R., & Dolan-Gavitt, B.
- Affiliations
- New York University
- University of Calgary (CA)
- New York University (US)
- Venue
- 2023 IEEE Symposium on Security and Privacy (SP)
- Publisher
- IEEE
- Published
- 2023-05
- Pages
- 2339-2356
- ISSN
- 1081-6011 (ISSN-L)
- OpenAlex
- W4385187279
- Semantic Scholar
- a5731122200fbb8b37f048010a1e1ca4474aa606
- Cited by
- 131
- References
- 40
- Citations by year
- 2026: 52 · 2025: 32 · 2024: 40 · 2023: 7
- FWCI
- 33.67
- Type
- conference paper
- Language
- en
- Open access
- closed
- Locations
- IEEE Symposium on Security and Privacy (S&P) (publishedVersion)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
- Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
- Keywords
- large language models, code completion, prompt engineering, secure code generation, codices
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.