# Smart Contracts Claimed Vulnerable by the CVE Database, with Labels and Source Locations

Crypto.world

> Researchers who build or evaluate vulnerability detectors need real-world test cases with known answers, but public bug databases rarely provide the matching code, the exact functions affected, and…

**arXiv**: 2609.01186

**Published**: 2026-09-01

**Authors**: Monika di Angelo, Gernot Salzer

## AI summary

## Overview

**Research area:** Blockchain security, specifically empirical smart contract security, vulnerability benchmarking, and vulnerability metadata curation.

**Technical level:** Advanced. The paper is readable as a narrative, but uses EVM/Solidity concepts, CVE/SWC/CWE taxonomy identifiers, compiler ASTs, and repository-level reproducibility tooling without explaining them in depth.

**Scope:** The paper describes *CVE-Smart-Contracts*, a curated and reproducible dataset of CVE records up to 24 July 2026 that concern Ethereum-family smart contracts, enriched with verified source code, runtime bytecode, three-taxonomy vulnerability labels, and function-level vulnerability locations.

## What This Paper Is About

Researchers who build or evaluate vulnerability detectors need real-world test cases with known answers, but public bug databases rarely provide the matching code, the exact functions affected, and the evidence needed to trust the link. This paper searches the CVE database for all reports concerning smart contracts, then uses scripted pipelines plus a small amount of manual review to attach each report to the actual source code and deployed bytecode, label the weakness in three standard taxonomies, and point to the affected functions. The result is a reproducible, auditable benchmark of 491 labeled and localized contract cases, plus a broader index of 568 CVE records including libraries and rejected or refuted cases.

## Key Contributions

1. **A comprehensive, up-to-date CVE-derived corpus.** The authors identify all CVE reports related to smart contracts through mid-2026 (snapshot commit `9fdf581`, dated 24 July 2026), yielding 568 curated CVE records, of which 542 concern deployed contracts (541 on Ethereum, 1 on BNB Smart Chain) and 26 concern libraries and packages. The dataset fully contains all CVE records used in the earlier VeriSmart (487 contracts) and SmartFix (200-contract subset) benchmarks.
2. **Automated correspondence validation between claims and artifacts.** A scoring pipeline combines CVE text, reference documents, compiler-derived interfaces, named functions, verified-source metadata, deployment addresses, and runtime bytecode selectors to decide whether a record's claim can be reliably linked to the retained source and to a specific deployment. It automatically classified 450 records as matches and 39 as non-matches, with 53 requiring documented manual decisions (47 matches, 6 non-matches), for a final 497 matches and 45 non-matches.
3. **Tri-taxonomy labels with machine-readable provenance.** Every indexed CVE is mapped to the Iuliano and Di Nucci smart contract weakness taxonomy, the Smart Contract Weakness Classification Registry (SWC), and the Common Weakness Enumeration (CWE), using 13 declarative rules over six ordered evidence tiers, plus documented manual decisions. The release contains 512 rule-based classifications, 55 manually classified records, and one record retained as `not classifiable`.
4. **Function-level vulnerability localization.** Each of the 491 catalog records is attributed to one or more function-like units in the retained verified source, including declaring contract, canonical function signature, inclusive line ranges, and externally callable entry-point paths. 415 locations come from a conservative automatic procedure and 76 from reviewed decisions.

## Main Findings

- **The catalog is 491 records, not 568.** From 568 indexed CVE records, 542 refer to deployed contracts; validation produced 497 correspondence matches and 45 non-matches. Six matched records were marked **refuted** (for example, because the vulnerable function was commented out), leaving 491 catalog entries. Two non-matching records are also marked refuted, for 8 refuted claims overall.
- **One weakness dominates the corpus.** Of the 491 catalog records, **431 are classified as integer overflow** (Iuliano and Di Nucci 6A1, CWE-190, SWC-101). The next most frequent are access control management (12, CWE-284/862, SWC-105), bad random number generation (10, CWE-338, SWC-120), erroneous constructor name (8, CWE-665, SWC-118), overpowered role (7, CWE-269), and incorrect calculation (5, CWE-682/697, SWC-101). All remaining listed categories occur once each.
- **The corpus is historically skewed to a single 2018 mass filing.** In 2018, the reporter BlockChainsSec accounts for 401 records, VenusADLab for 32, PeckShield for 22, dwfault for 10, safecomet for 8, jonghyk.song for 7, hellowuzekai and TEAM-C4B for 6 each, n0pn0pn0p and SCResearcher for 5 each, and rootclay and Coinmonks for 2 each, with 9 from others. The paper recounts that a company mass-filed 401 reports using an apparent script, and Mitre assigned about 500 identifiers. After the 2018 spike, smart-contract submissions never exceeded 11 in any subsequent year.
- **Later years are dominated by maintainers, not one-off deployments.** From 2021 to 2025, OpenZeppelin is the most frequent reporter (4 in 2021, 7 in 2022, 7 in 2023, 1 in 2024, 1 in 2025), alongside MRdoulestar (4 in 2021), RikkaLzw (3 in 2023, 1 in 2025), Wzy-source (4 in 2024), and ensdomains (1 each in 2020, 2023, 2026).
- **The earlier benchmark is largely reproduced.** A file-level comparison with VeriSmart found 485 of 487 artifacts substantially the same, disregarding line endings, whitespace, pragma and modifier corrections, or bundles. Two cases select different artifacts, which VeriSmart sets as invalid but which pass correspondence validation here.
- **Human effort is a minority of the pipeline.** The authors state that retrieval, evidence collection, validation, labeling, and localization are automated, leaving 15 % to manual analysis.
- **The dataset does not certify exploitability.** Labels and locations characterize the *reported claim*; they do not independently establish that a weakness exists or is exploitable. Only three CVE records contain enough data to support statement-level locations, which is why those are kept in `localization/locations.json` but not exported to the top-level catalog.

## Methodology in Plain English

The authors start from a full copy of the CVE database and run a filter script (`filter_ethereum_smart_contract_cves.py`) that looks for textual and reference cues such as "smart contract", "Ethereum", "Solidity", token standard names, and blockchain explorer links, then manually review the candidates to exclude client software, compilers, off-chain applications, and protocol-level issues without an affected contract.

For each in-scope record, they try to find a deployment address, either stated in the record or named in a supporting document, and reuse addresses from earlier datasets. A script pulls from the Etherscan API V2 the verified source code, compilation metadata, runtime bytecode, and return values of certain view functions. Versioned projects such as libraries are handled differently: the authors keep a snapshot of the specific version flagged as vulnerable.

Next, they check whether the retained evidence really supports the link. Two separate claims are scored: that the CVE description refers to the source downloaded for the indicated source address, and that the named contract is actually deployed at the indicated deployment address. This distinction matters because the address in a CVE record may point to a file containing several contracts, only one of which is the one deployed. The rules look for addresses in the record or its documents, matching function/contract/token names against the source and Etherscan data, and verbatim code snippets from supporting documents in the downloaded source. Clear cases are decided automatically; incomplete or contradictory ones go to a human, who records the decision and a justification.

For labeling, text from six evidence tiers (CVE descriptions, CVE titles, curated evidence, directly referenced documents, OCR or reference-metadata text, and finally source code) is matched against 13 declarative rules built from case-insensitive regular expressions, with `all`, `any`, and `none` constraint types. A single applicable rule at the strongest matching tier yields automatic suggestions for all three taxonomies; multiple applicable rules are treated as ambiguous rather than ranked, and no applicable rule yields "insufficient evidence". CWE assertions supplied by the CVE record are preserved and compared but not automatically adopted.

For localization, they compile the retained source with the appropriate Solidity compiler version (via `solc-select`) to get an abstract syntax tree, build an inventory of contracts, functions, constructors, fallback/receive functions, modifiers, visibility, and statically resolvable calls with line ranges, then match evidence code blocks and named entities against source units, traversing call and modifier edges backwards to find externally reachable entry points. Exact code matches outrank explicit function names; contract-name evidence sets scope but cannot alone select a function. High-confidence leaf functions, or uncontested medium-confidence functions declared by the indexed contract, are accepted automatically; everything else goes to review.

Finally, the catalog is built rather than hand-edited: only non-refuted records classified as matches, with both a resolved label record and a released location record, are admitted, and the build stops if any component is missing. Reproducibility is enforced by keeping all external inputs, pinning dependencies (Python 3.14.3 on macOS Darwin 25.5.0 arm64, `ethutils` at commit `b2c349a`), and running a verification script that rejects any difference between regenerated and committed outputs.

## Why This Matters

**Impact on research.** Most smart contract vulnerability benchmarks are either synthetic or derived from a narrow slice of history. This dataset closes the loop between a public vulnerability report, the exact code that was deployed, a standardized weakness label, and the specific function at fault, and it does so with retained evidence so that results can be audited and rebuilt. The heavy skew toward integer overflow (431 of 491 records) is itself a finding that benchmark users need to know, because it limits what an aggregate score on this corpus actually measures.

**Real-world applications.**

- Benchmarking static analyzers, fuzzers, dynamic tools, language-model-based detectors, and automated repair systems on cases that actually occurred rather than injected bugs.
- Auditing existing benchmarks: the paper's file-level comparison lets others check whether their corpus reproduces the same artifacts as VeriSmart and SmartFix.
- Vulnerability classification and retrieval research, using the tri-taxonomy labels as parallel ground truth across a practitioner taxonomy (SWC), a general software taxonomy (CWE), and a smart-contract-specific hierarchy.
- Studies of vulnerability metadata quality: the refuted records, the 45 non-matches, and the mass-filed 2018 batch are direct evidence of how noisy public vulnerability reporting can be.

**Industry relevance.** Security teams, auditors, and tool vendors gain a defensible, citable evaluation set with per-case provenance. The dataset also documents a governance question the CVE program itself has struggled with since the 2016 DAO hack discussion: whether vulnerabilities in immutable, maintainer-less deployed contracts fit a reporting scheme designed around versioned products with identifiable maintainers. The paper notes that for individual deployments the stakeholders are often unknown, confidential disclosure may be impossible, publication may facilitate attacks, and no direct fix is available, since immutability precludes patching at the same address.

## Future Directions

- **Closing the completeness gap.** The authors explicitly state they cannot guarantee completeness, because an in-scope CVE record may contain none of the filter's textual cues. Systematic auditing of the full CVE corpus, or cross-referencing additional numbering authorities, would test how many records are missed.
- **Extending beyond function-level localization.** Only three CVE records carry enough information to identify the vulnerable statement, so statement-level ground truth is essentially absent. Better evidence extraction, or curated reproduction of vulnerabilities, would enable finer-grained evaluation.
- **Revisiting the claim-to-artifact link at scale.** Correspondence validation rejected 45 of 542 contract records and flagged 8 as refuted. Studying why CVE records are erroneous or underspecified, and whether upstream numbering authorities can be given better guidance or templates, is a natural follow-up.
- **Tracking dataset drift over time.** The authors separate network acquisition from the deterministic build precisely because refreshes can change results. Longitudinal work could measure how CVE records, explorer responses, and labels evolve, and how stable automated labels remain as taxonomies are revised (the frozen inputs here are Iuliano and Di Nucci Table 10, SWC Registry commit `1b62270` of 6 August 2024, and CWE catalog 4.20 of 30 April 2026).

## Target Audience

Researchers and graduate students in blockchain and software security who need real-world smart contract vulnerability benchmarks; developers and maintainers of static analysis, fuzzing, formal verification, and automated repair tools who want an evaluation corpus with provenance; auditors and security engineers interested in how CVE records map to deployed code; and anyone studying vulnerability metadata quality, taxonomy mapping, or the operational rules of the CVE program for blockchain software. Readers without familiarity with Solidity, the EVM, and CWE/SWC identifiers will need background reading, since the paper assumes that vocabulary throughout.

## Authors’ abstract

The Common Vulnerabilities and Exposures (CVE) database catalogs vulnerability claims in hard- and software, among them those pertaining to blockchain programs a.k.a. smart contracts. We present CVE-Smart-Contracts, a curated dataset of CVE records up to July 2026 referring to Ethereum smart contracts. The dataset contains the vulnerable artifacts (source code and runtime bytecode), labels according to three taxonomies, and function-level locations. The retrieval of CVE…

[The full abstract on arXiv](https://arxiv.org/abs/2609.01186)

[Read the original paper](https://arxiv.org/abs/2609.01186)

---

Canonical: https://crypto.world/paper/smart-contracts-claimed-vulnerable-by-the-cve-database-with-labels-and-2609.01186
