An empirical study of blockchain system vulnerabilities: modules, types, and patterns

  • Xiao YI
  • , Daoyuan WU*
  • , Lingxiao JIANG
  • , Yuzhou FANG
  • , Kehuan ZHANG
  • , Wei ZHANG
  • *Corresponding author for this work

Research output: Book Chapters | Papers in Conference ProceedingsConference paper (refereed)Researchpeer-review

Abstract

Blockchain, as a distributed ledger technology, becomes increasingly popular, especially for enabling valuable cryptocurrencies and smart contracts. However, the blockchain software systems inevitably have many bugs. Although bugs in smart contracts have been extensively investigated, security bugs of the underlying blockchain systems are much less explored. In this paper, we conduct an empirical study on blockchain's system vulnerabilities from four representative blockchains, Bitcoin, Ethereum, Monero, and Stellar. Specifically, we first design a systematic filtering process to effectively identify 1,037 vulnerabilities and their 2,317 patches from 34,245 issues/PRs (pull requests) and 85,164 commits on GitHub. We thus build the first blockchain vulnerability dataset, which is available at https://github.com/VPRLab/BlkVulnDataset. We then perform unique analyses of this dataset at three levels, including (i) file-level vulnerable module categorization by identifying and correlating module paths across projects, (ii) text-level vulnerability type clustering by natural language processing and similarity-based sentence clustering, and (iii) code-level vulnerability pattern analysis by generating and clustering code change signatures that capture both syntactic and semantic information of patch code fragments. Our analyses reveal three key findings: (i) some blockchain modules are more susceptible than the others; notably, each of the modules related to consensus, wallet, and networking has over 200 issues; (ii) about 70% of blockchain vulnerabilities are of traditional types, but we also identify four new types specific to blockchains; and (iii) we obtain 21 blockchain-specific vulnerability patterns that capture unique blockchain attributes and statuses, and demonstrate that they can be used to detect similar vulnerabilities in other popular blockchains, such as Dogecoin, Bitcoin SV, and Zcash.

Original languageEnglish
Title of host publicationESEC/FSE 2022: Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering
EditorsAbhik ROYCHOUDHURY, Cristian CADAR, Miryung KIM
PublisherAssociation for Computing Machinery, Inc
Pages709-721
Number of pages13
ISBN (Electronic)9781450394130
DOIs
Publication statusPublished - 9 Nov 2022
Externally publishedYes
Event30th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering - Singapore, Singapore
Duration: 14 Nov 202218 Nov 2022

Conference

Conference30th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering
Abbreviated titleESEC/FSE 2022
Country/TerritorySingapore
CitySingapore
Period14/11/2218/11/22

Bibliographical note

Acknowledgements:
We thank all the reviewers of this paper for their detailed and constructive comments.

Publisher Copyright:
© 2022 ACM.

Funding

This work is partially supported by a direct grant (ref. no. 4055127) from The Chinese University of Hong Kong.

Keywords

  • Blockchain Security
  • System Vulnerability
  • Data Mining

Fingerprint

Dive into the research topics of 'An empirical study of blockchain system vulnerabilities: modules, types, and patterns'. Together they form a unique fingerprint.

Cite this