Metraipolis › archive › dc_18c17b774ff3

Exploring Automated Vulnerability Identification in JavaScript Code Using Large Language Models — arXiv:2609.13816

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.13816
License (as archived)
CC0-1.0
Archived
2026-10-15T22:50:43.245Z
SHA-256 of the archived text
5ba2c6bcea11e89886740754a777a804b7cd069bca4567c1c005061249264427
Stable URL of this page
https://metraipolis.com/documento/dc_18c17b774ff3

How to cite

Exploring Automated Vulnerability Identification in JavaScript Code Using Large Language Models — arXiv:2609.13816 — arXiv (en), https://arxiv.org/abs/2609.13816 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_18c17b774ff3 (Metraipolis archive dc_18c17b774ff3, sha256 5ba2c6bcea11e89886740754a777a804b7cd069bca4567c1c005061249264427)
BibTeX
@misc{dc18c17b774ff3,
  title = {Exploring Automated Vulnerability Identification in JavaScript Code Using Large Language Models — arXiv:2609.13816},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.13816},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_18c17b774ff3; sha256 5ba2c6bcea11e89886740754a777a804b7cd069bca4567c1c005061249264427},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.13816. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

JavaScript powers approximately 98.8% of all websites, making vulnerabilities in its code a significant security risk, yet existing detection approaches such as Static Application Security Testing (SAST) tools often fail to identify many real-world vulnerabilities when applied to isolated code snippets. This paper presents an empirical study of Large Language Model (LLM)-based vulnerability identification for JavaScript programs, evaluating three LLM families (Gemini 1.5 Flash, GPT-4o Mini, DeepSeek-R1-Distill-Llama-8B) across multiple prompting strategies (zero-shot, chain-of-thought, few-shot) and fine-tuning approaches on a dataset of 1,125 JavaScript code snippets spanning five Common Weakness Enumeration (CWE) categories: Injection (CWE-74), OS Command Injection (CWE-78), Cross-Site Scripting (CWE-79), SQL Injection (CWE-89), and Uncontrolled Resource Consumption (CWE-400). Our experiments show that LLMs substantially outperform traditional SAST tools on snippet-level vulnerability identification, with a fine-tuned Gemini 1.5 Flash model achieving 60% detection accuracy compared to near-zero performance from rule-based analyzers. We find that fine-tuning improves accuracy from 29% to 60%, Chain-of-Thought prompting benefits reasoning-capable models such as GPT-4o Mini, few-shot prompting is effective for polymorphic vulnerabilities such as Cross-Site Scripting, and performance varies across vulnerability categories, reaching up to 84% accuracy for structured vulnerabilities such as SQL Injection. These results indicate that LLMs provide a practical approach for automated vulnerability identification in JavaScript code, particularly when combined with task-aligned supervision, though they should complement rather than replace existing security analysis workflows due to limited recall and uneven performance across vulnerability types.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-15 in cs.AI).
Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2609.13816 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-15T22:29:03.561Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-15?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).