LSPFuzz: Hunting Bugs in Language Servers

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhu, Hengcheng, Chen, Songqiang, Terragni, Valerio, Wei, Lili, Liu, Yepang, Wu, Jiarong, Cheung, Shing-Chi
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912853895675904
author Zhu, Hengcheng
Chen, Songqiang
Terragni, Valerio
Wei, Lili
Liu, Yepang
Wu, Jiarong
Cheung, Shing-Chi
author_facet Zhu, Hengcheng
Chen, Songqiang
Terragni, Valerio
Wei, Lili
Liu, Yepang
Wu, Jiarong
Cheung, Shing-Chi
contents The Language Server Protocol (LSP) has revolutionized the integration of code intelligence in modern software development. There are approximately 300 LSP server implementations for various languages and 50 editors offering LSP integration. However, the reliability of LSP servers is a growing concern, as crashes can disable all code intelligence features and significantly impact productivity, while vulnerabilities can put developers at risk even when editing untrusted source code. Despite the widespread adoption of LSP, no existing techniques specifically target LSP server testing. To bridge this gap, we present LSPFuzz, a grey-box hybrid fuzzer for systematic LSP server testing. Our key insight is that effective LSP server testing requires holistic mutation of source code and editor operations, as bugs often manifest from their combinations. To satisfy the sophisticated constraints of LSP and effectively explore the input space, we employ a two-stage mutation pipeline: syntax-aware mutations to source code, followed by context-aware dispatching of editor operations. We evaluated LSPFuzz on four widely used LSP servers. LSPFuzz demonstrated superior performance compared to baseline fuzzers, and uncovered previously unknown bugs in real-world LSP servers. Of the 51 bugs we reported, 42 have been confirmed, 26 have been fixed by developers, and two have been assigned CVE numbers. Our work advances the quality assurance of LSP servers, providing both a practical tool and foundational insights for future research in this domain.
format Preprint
id arxiv_https___arxiv_org_abs_2510_00532
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LSPFuzz: Hunting Bugs in Language Servers
Zhu, Hengcheng
Chen, Songqiang
Terragni, Valerio
Wei, Lili
Liu, Yepang
Wu, Jiarong
Cheung, Shing-Chi
Software Engineering
Cryptography and Security
D.2.5
The Language Server Protocol (LSP) has revolutionized the integration of code intelligence in modern software development. There are approximately 300 LSP server implementations for various languages and 50 editors offering LSP integration. However, the reliability of LSP servers is a growing concern, as crashes can disable all code intelligence features and significantly impact productivity, while vulnerabilities can put developers at risk even when editing untrusted source code. Despite the widespread adoption of LSP, no existing techniques specifically target LSP server testing. To bridge this gap, we present LSPFuzz, a grey-box hybrid fuzzer for systematic LSP server testing. Our key insight is that effective LSP server testing requires holistic mutation of source code and editor operations, as bugs often manifest from their combinations. To satisfy the sophisticated constraints of LSP and effectively explore the input space, we employ a two-stage mutation pipeline: syntax-aware mutations to source code, followed by context-aware dispatching of editor operations. We evaluated LSPFuzz on four widely used LSP servers. LSPFuzz demonstrated superior performance compared to baseline fuzzers, and uncovered previously unknown bugs in real-world LSP servers. Of the 51 bugs we reported, 42 have been confirmed, 26 have been fixed by developers, and two have been assigned CVE numbers. Our work advances the quality assurance of LSP servers, providing both a practical tool and foundational insights for future research in this domain.
title LSPFuzz: Hunting Bugs in Language Servers
topic Software Engineering
Cryptography and Security
D.2.5
url https://arxiv.org/abs/2510.00532