CoChat

Examining Zero-Shot Vulnerability Repair with Large Language Models

Pearce, Hammond, Tan, Benjamin, Ahmad, Baleegh, Karri, Ramesh, Dolan-Gavitt, Brendan · 2023 · 2023 IEEE Symposium on Security and Privacy (SP)

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.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1109/sp46215.2023.10179324

Cites

43 of 43 references verified0 citation errors · 0 not checkable

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.

A few free checks a day · papers already verified open instantly · results are public

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?

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

Show all 43 references

Research works printed but not linked: 7

  1. GitHub Copilot • Your AI pair programmer. Github,
  2. Discover Use Cases for AI21 Studio and Jurassic-1. AI21.
  3. Completion -OpenAI API. Openai,
  4. Jurassic-1: Technical Details and Evaluation. O Lieber, O Sharir, B Lentz, Y Shoham, I21
  5. Source Code Analysis Tools. OWASP.
  6. Examples -OpenAI API. Openai,
  7. 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

See all 663

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
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

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Examining Zero-Shot Vulnerability Repair with Large Language Models. https://app.cochat.ai/papers/10.1109/sp46215.2023.10179324
The paper
Pearce, H., Tan, B., Ahmad, B., Karri, R., & Dolan-Gavitt, B. (2023). Examining Zero-Shot Vulnerability Repair with Large Language Models. 2023 IEEE Symposium on Security and Privacy (SP). https://doi.org/10.1109/sp46215.2023.10179324

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.