Reachability Analysis: Why Most Dependency CVEs Don't Matter, and How to Prove It

The noise problem
Most of the CVEs a dependency scanner reports are in code the application never executes. That is not an opinion about tooling; it is what every large-scale measurement of the problem has found, across ecosystems and years of studies.
Start with how much code an application actually pulls in. A 2019 study of the npm registry (676,539 packages, 5.4 million versions) found that installing an average package implicitly trusts 79 third-party packages and 39 maintainers, and that up to 40% of all packages depend on code with at least one publicly known vulnerability (Zimmermann et al., USENIX Security 2019). For Java, a 2023 study of 3 million Maven packages against 1,300 security reports found that of 1.1 million projects flagged as vulnerable, only 31% had the vulnerability in a direct dependency; the rest inherited it transitively (Mir, Keshani and Proksch, SANER 2023).
Now ask how much of that flagged code is ever called. The same Maven study built whole-program call graphs for the affected projects and found that only 1.2% of the 1.1 million transitively affected projects actually invoke the vulnerable code. A 2026 study of 2,414 open-source repositories across Python, Rust, Ruby and PHP went further: it generated accurate SBOMs from lock files, ran two mainstream scanners, and manually verified every reported vulnerability in a 16-repository sample. Of 113 reported vulnerabilities, 9 were real — a 92.0% false-positive rate — and the authors identified unreachable code as the primary cause (Zhou, Dacier and Konstantinou, CODASPY 2026).
Two things to hold onto, then. In the Maven study roughly two thirds of flagged projects had the vulnerability only through a transitive dependency, so direct-only analysis leaves much of the problem unexamined. And when the analysis is done at the level of functions instead of packages, most of those flags turn out to be noise, by amounts that vary with the ecosystem, the method and what is being counted. Reachability analysis is the technique that measures this instead of guessing at it.
What reachability means, precisely
A vulnerability is reachable if there exists a path in the program's call graph from an entry point to a function the advisory identifies as vulnerable. Three terms in that sentence carry all the weight.
Entry points are where execution can begin: main, package initialisers, exported handlers, framework-registered routes, test functions if you choose to count them. Miss an entry point and everything it alone reaches is wrongly classified unreachable. For a Go binary the set is well defined; for a Spring application half the entry points are discovered by the framework at runtime through annotations and the analysis must model that or admit it cannot.
The call graph is a directed graph whose nodes are functions and whose edges are possible calls. The word possible is the whole subject. A direct call f() is one edge. A call through an interface, a virtual method, a function pointer or a dynamically named property may have one target or fifty, and the analysis has to decide which to include.
Vulnerable symbols are the functions, methods or properties an advisory actually affects. Advisories name package version ranges; the symbol list has to come from somewhere else, which is the subject of a later section.
Two properties describe how good a call graph is, and they pull in opposite directions:
- Soundness (also called recall): every edge that can occur at runtime is in the graph. A sound graph never calls something unreachable when it is reachable.
- Precision: edges in the graph can actually occur. An imprecise graph has edges to targets that never execute, so it calls things reachable that are not.
For vulnerability triage the asymmetry is clear: a false unreachable lets a real CVE be waived, a false reachable costs a developer some minutes. So a reachability analysis for security must lean toward soundness, and the honest output has three values, not two:
| Verdict | Meaning | What the analysis must have established |
|---|---|---|
| Reachable | A path exists from an entry point to a vulnerable symbol | At least one witness path, shown to the user |
| Unreachable | No such path exists in a graph the analysis trusts | Complete entry points, a sound graph for this package, no unresolved calls into it |
| Unknown | The analysis could not decide | A named reason: no symbol data, unresolved dynamic call, unsupported construct |
Any tool that returns only reachable or unreachable is hiding the third row inside one of the first two. Which one it hides it in tells you whether the tool was built for precision or for safety.
How a call graph is built
The hard part of a call graph is not the direct calls; it is deciding what a polymorphic call site can invoke. Four classical algorithms answer that question with increasing precision and increasing cost, and every production reachability tool is one of them, or a hybrid.
| Algorithm | How it resolves obj.method() | Precision | Cost | Where it is used |
|---|---|---|---|---|
| Class Hierarchy Analysis (CHA) | Every subtype of the declared type that overrides method | Low: a call on Reader targets every Reader in the program | Linear in program size; seconds on millions of lines | First pass everywhere; the over-approximate baseline |
| Rapid Type Analysis (RTA) | CHA, restricted to types that are instantiated somewhere reachable | Medium | Linear, with one fixpoint | Default in several JVM toolchains |
| Variable Type Analysis (VTA) | Propagates the set of types each variable can hold through assignments | Medium-high | Near-linear; one pass over an assignment graph | Go's vulnerability checker uses CHA then VTA |
| Points-to analysis (Andersen, Steensgaard, k-CFA) | Tracks which allocation sites each pointer can refer to, optionally per calling context | High | Cubic in the worst case; minutes to hours on large programs | Research tools, taint analysis, high-value targets |
The ordering matters because it is a soundness contract: CHA must over-approximate RTA, which must over-approximate VTA. A 2026 metamorphic study of Java frameworks found that this contract is routinely broken in practice — a more precise setting sometimes adds edges, and different frameworks disagree about what the ground truth even is (Zhong, Wold and Windmann, 2026). The practical lesson is that the algorithm name on the box tells you less than a benchmark does.
For dynamically typed languages the type hierarchy does not exist, so the equivalent of CHA is name matching (any property called parse may call any function called parse), and anything better requires tracking values. The picture below shows what the graph is for.
illustrative call graph · two advisories, one witness path
Two advisories, one application. The package-level scanner reports both. The call graph shows that main reaches OrderService.submit, which calls the direct dependency's http.Client.Do, which reaches h2.parseHeaders inside a transitive dependency: CVE A is reachable, with that chain as evidence. xml.expandEntity is also present in the build and also vulnerable, but the only path to it starts at ReportUtil.format, which nothing calls: CVE B is unreachable. The grey nodes are what an SBOM counts; the blue path is what an attacker can use.
Modular analysis: summarise once, reuse everywhere
A whole-program call graph of an application plus all of its dependencies is expensive, and almost all of that expense is spent on code that is identical across every application using the same package version. The scaling trick that makes reachability practical is to analyse each package once, in isolation, and keep only a summary: for every exported symbol, which vulnerable symbols it can reach, through its own transitive dependencies included.
The idea was formalised for Node.js by Nielsen, Torp and Møller in 2021. Their modular call-graph construction analysed each npm module separately, composed the results per application, and on a benchmark of real applications reduced the number of false positives by 81% compared with the package-level audit tool, with zero false negatives on the ground truth (ISSTA 2021). Analysis time also dropped substantially when modular results were reused across applications, because the per-package work is amortised.
What the application-side analysis then needs is small:
- The application's own call graph, from its entry points.
- The set of (package, exported symbol) pairs the application calls directly.
- For each direct dependency version, the precomputed summary.
Reachability becomes a join: a vulnerability is reachable if some exported symbol the application calls has the vulnerable symbol in its reach set. The witness path is the application's own path to the call site, concatenated with the path stored in the summary. Transitive dependencies are never opened on the application side at all.
The approach has a cost in precision that is worth stating. A summary is context-insensitive: it says Client.Do can reach parseHeaders, not that it does so under this application's arguments and configuration. That is a source of false reachable verdicts, which is the safe direction. A VEX benchmark published in 2026 on Go projects shows the effect: about 70% of the false positives that reachability tools still produced were labelled code not reachable. The authors explain this by two things: a vulnerable function appearing in the call graph does not establish that the path is feasible under real branch conditions, and call graphs that are both sound and precise are hard to build (VEX-Bench, 2026). Closing that gap requires data-flow or dynamic analysis per application, which is where the cost curve turns steep again.
The vulnerable-symbol problem
A call graph answers "can I reach function F?" Advisories almost never say which F. A CVE record names a package and a version range; the function, method or property that actually carries the flaw is in the prose, the fix commit, or nowhere. Without that mapping the most precise call graph in the world has nothing to look for.
The Go ecosystem is the exception that proves the point. Its vulnerability database publishes structured affected-symbol lists per advisory, which is why fully automated reachability has existed there for years. The 2026 SBOM study above built a proof-of-concept on exactly that data and, across 12 widely used Go projects, pruned 74.4% of reported vulnerabilities (121 reported, 31 with the affected symbol confirmed present in the compiled binary). The authors confirmed with maintainers of major scanning tools that the absence of function-level metadata in mainstream advisory databases is a known, critical bottleneck, and they call for a standard affected_symbols field (Zhou et al., 2026).
Until that field exists, symbols are derived. The standard method comes from the Java work of Ponta, Plate and Sabetta: identify the fix commit for the advisory, diff the vulnerable and fixed versions, and treat the changed program constructs, such as methods, as the vulnerable set. Their code-centric approach, which combined that derivation with static and dynamic reachability, was evaluated on more than 250,000 scans of about 500 applications in an industrial setting (ICSME 2018). The same group released a manually curated dataset of fix commits to make the derivation reproducible (MSR 2019).
Fix-commit diffing is a heuristic, and its failure modes are worth knowing:
- The fix touches more than the flaw: refactoring, tests and helper changes inflate the symbol set, which is safe but noisy.
- The fix touches less than the flaw: a one-line guard added in a caller leaves the real vulnerable function unchanged, so the set misses it. This is the unsafe direction.
- The vulnerability is in initialisation, configuration or data rather than in a function: prototype pollution, unsafe defaults, a bundled native library. The honest symbol for these is "the module itself", which collapses reachability back to "is it imported".
- The advisory has no public fix, or the fix is in a fork.
A workable pipeline therefore has three tiers of confidence — authoritative (the ecosystem publishes symbols), reviewed (a human checked a derived set against the diff), derived (automated only) — and a rule that a derived set may produce a reachable verdict but never an unreachable one. The number of advisories that matter is also far smaller than the number that exist: the symbol work only has to be done for advisories that match packages real applications actually use, which in practice concentrates on a few hundred popular libraries per ecosystem.
What the numbers say
The effect is large, consistent across projects, and bounded: reachability removes most of the noise, not all of it, and the residue is where the real work is.
Zhou, Dacier and Konstantinou, CODASPY 2026, Table 9 · 12 Go projects, 121 reported vulnerabilities; one project with zero reports omitted
The spread is the interesting part. Prometheus loses 90% of its reported vulnerabilities to reachability; Caddy loses only half. I read that spread as architecture rather than analysis quality: a web server that exposes much of its dependency surface at runtime has more live paths than a metrics collector that uses a narrow slice of each library. Reachability is measuring the application, not the scanner.
Across the literature the headline figures line up, even though they measure slightly different things:
| Study | Ecosystem | What was measured | Result |
|---|---|---|---|
| Mir et al., SANER 2023 | Maven, 3M packages | Transitively affected projects that call vulnerable code | 1.2% |
| Nielsen et al., ISSTA 2021 | npm | False positives removed vs package-level audit; false negatives | 81% removed; 0 missed |
| Zhou et al., CODASPY 2026 | Python, Rust, Ruby, PHP; 16 repos, manual | Reported vulnerabilities confirmed real | 9 of 113 (92.0% false positive) |
| Same study | Same sample, function-call check | Reports removed by checking whether the vulnerable function is referenced | 113 → 42 (the paper reports 61.9%) |
| Same study | Go, 12 projects, automated | Reports removed by symbol-level analysis of the compiled binary | 74.4% (121 → 31) |
| VEX-Bench, 2026 | Go, 30 cases | False positives remaining after reachability that were labelled code not reachable | about 70% |
Read together: package-level matching is wrong most of the time. Function-level reachability removes a large share of that error, from 71 of 104 false reports in the manually verified sample to 81% in the npm benchmark, but it is not perfect in either direction. In that same sample 33 of the 42 reports left after the function check were still false, and VEX-Bench recorded one reachability tool missing 1 of 7 truly affected Go cases. What remains includes paths that exist in the graph but cannot execute, which only data-flow or runtime evidence can settle.
Where static reachability fails
Every static call graph is unsound somewhere, and for security the unsound places are the ones that matter, because they are where a real path can hide. The failure modes are well catalogued; what distinguishes a trustworthy tool is whether it reports them as Unknown or silently as Unreachable.
Dynamic dispatch the analysis cannot resolve. Reflection in Java (Class.forName, Method.invoke), getattr and importlib in Python, computed property access and eval in JavaScript, function pointers cast through void* in C. A 2018 test-suite study of Java frameworks found that the two most widely used analysis frameworks each missed expected edges, that standard language features were well supported while support for core APIs varied significantly, and that support for lambdas and reflection differed between them (Reif et al., SOAP 2018).
Framework-managed control flow. Dependency injection, annotation-driven routing, event buses and ORM callbacks mean that in a typical web application a large fraction of the entry points and edges are created by the framework at runtime. Without a model of the framework, those functions look dead. The 2022 root-cause study of JavaScript call graphs built a method to quantify which language and framework features cause missing edges, and found dynamic property accesses to be the most common root cause across its benchmarks, with the other causes varying by benchmark (Chakraborty et al., ECOOP 2022).
Dynamically typed languages in general. For JavaScript the state of the art is a hybrid: run a cheap dynamic pre-analysis to collect hints about object shapes and values, then feed those hints to the static phase. The technique, called approximate interpretation, produced on average 55.1% more call edges, 21.8% more reachable functions and 17.7% more resolved call sites than purely static analysis, with only 1.5% fewer monomorphic call sites — a large soundness gain at a small precision cost (Laursen, Xu and Møller, PLDI 2024). Even so, an independent 2024 benchmark measured the same tool at 67.4% soundness on a JavaScript micro-benchmark, against 87.3% for a Python static tool on its own language's micro-benchmark, where soundness counts test cases passed rather than edges recovered (arXiv 2410.00603). JavaScript remains the hardest ecosystem to be sound in.
Build-dependent languages. Java and C/C++ reachability needs compiled output or a compilation database; without a successful build the analysis has a partial program. The VEX benchmark reported that a Go reachability tool requiring a build completed only 19 of its 30 cases for that reason alone (VEX-Bench, 2026).
The engineering response to all four is the same rule: over-approximate. When a call site cannot be resolved, assume it reaches everything plausible; when an entry point set is suspect, say Unknown rather than Unreachable; when a dynamic hint is available, use it to add edges, never to remove them. The cost is more reachable verdicts to triage. The benefit is that an unreachable verdict can be waived without a second thought, which is the only thing that makes the whole exercise worth doing.
What a trustworthy verdict looks like
A reachability verdict is only as good as what you can check about it. If you are evaluating an analysis, or building one, these are the questions whose answers decide whether an Unreachable can be waived.
- Is there a witness path for every Reachable? A verdict without the chain of functions from entry point to vulnerable symbol cannot be verified and cannot be fixed. The path is the product.
- Where do the vulnerable symbols come from, and at what confidence? Authoritative ecosystem data, a human-reviewed fix-commit diff, or an automated guess. A tool that cannot answer this per advisory is guessing for you.
- Is Unknown a first-class result? Count how often it appears on a real codebase. Zero is not a good sign; it means the tool has folded its uncertainty into one of the other two answers.
- Which way does it err? Take a benchmark of known-reachable vulnerabilities and check for false Unreachable verdicts. The best research result is zero false negatives on a small ground truth, and other benchmarks do record misses. Treat every false Unreachable as a defect, because a single miss is a waived CVE.
- Does it model your frameworks? Ask which entry points it found in a Spring, Django or Express application. If the answer is
mainand nothing else, most of the application is invisible to it. - What does it do with transitive dependencies? Analysing them per application is slow and rarely necessary; analysing them once and summarising is the approach that scales. Either way, the verdict must account for them: the 69% of flagged projects in the Maven study that inherited their vulnerability transitively are not optional.
The measured reality is that package-level dependency scanning is wrong most of the time, from about three times in four to nine times in ten in the studies here, that function-level reachability corrects a large share of that while still occasionally missing a real case, and that the hardest remaining problem is not the call graph but the advisory metadata. A security program that acts on those three facts fixes the vulnerabilities that can be exploited and stops arguing about the ones that cannot.
