TLDR overview
- CVE detection identifies known, publicly cataloged vulnerabilities in the open source and third-party components an application depends on, including transitive dependencies.
- It matters because most of what you ship is code you did not write, and dependencies now arrive faster than any team can review them by hand.
- Counting CVEs is not managing risk: severity scores measure impact, not whether a flaw is exploitable or whether your code even calls it.
- Effective programs combine severity, exploitation likelihood, known-exploited status, and reachability to prioritize what to fix first.
- SonarQube Advanced Security detects known vulnerabilities in open source dependencies and prioritizes them by severity (CVSS) and exploitability (EPSS, KEV).
The open source and third-party dependencies in your application are the part of the software supply chain you did not write but still ship, and still answer for. When a vulnerability surfaces in one of those components, the question your board, your auditors, and your on-call engineers all ask is the same: are we exposed? CVE detection is how you answer it.
This page explains what CVE detection is, why it has become a continuous engineering requirement rather than a periodic audit, how the underlying scanning works, and why raw vulnerability counts mislead teams. It then covers how to prioritize what actually matters and where CVE detection sits within software supply chain security and third-party risk.
What is CVE detection in dependencies?
CVE detection is the practice of identifying known, publicly disclosed vulnerabilities, cataloged as CVE records, in the open source and third-party components an application uses, including the transitive dependencies those components pull in. A CVE is a single catalog entry for one publicly disclosed security flaw, assigned a unique identifier so that everyone discussing the issue is referring to the same thing.
The CVE Program, operated by MITRE and sponsored by CISA, assigns and publishes these records through partner organizations called CVE Numbering Authorities, which can be vendors, open-source projects, coordination centers, or research groups. Each published record carries an identifier, a prose description, and at least one public reference.
In plain terms, CVE detection answers a direct question: which of the outside components my software relies on contain security flaws that the world already knows about? It covers both the libraries you added deliberately and the ones those libraries dragged in behind them.
Why does CVE detection matter now?
Most of the code running in a modern application is code your team never wrote. Open source libraries and third-party components make up a large share of what ships, and every one of them is a dependency you are accountable for once it reaches production. That accountability does not transfer to the maintainer.
The pace has changed the problem. Developers and AI coding agents now add dependencies faster than any review process built for manual approval can keep up. Agents in particular reach for libraries drawn from their training data, which can mean stale or already-vulnerable versions enter a codebase without a human ever choosing them. This is a risk pattern Sonar has observed rather than a quantified measurement, but the direction is clear: the volume of third-party code entering your repositories is rising, and the window to catch problems is shrinking.
The timing gap is where risk concentrates. The median time to patch a known exploited vulnerability is 43 days, according to 451 Research. That is a median, not a ceiling, and it describes how long organizations take to remediate flaws attackers are already using. Software Supply Chain Failures ranks number three in the OWASP Top 10 2025. When detection is slow or incomplete, the exposure window stays open, and attackers know where to look.
How does CVE detection work?
CVE detection starts with your dependency manifests and lockfiles, the declared record of what your project depends on and at which versions. A scanner reads these files, resolves the full dependency tree including transitive dependencies, and matches each component and version against one or more vulnerability databases.
Direct versus transitive dependencies
A direct dependency is one your code declares and uses on purpose. A transitive dependency is one pulled in by a direct dependency, often several layers deep, that your team never selected and may not know exists. Most of the components in a typical dependency tree are transitive, which is exactly why they are easy to miss and why manual tracking fails. Transitive dependency vulnerabilities are a leading source of exposure precisely because no one chose them.
CVE, NVD, and OSV
These sources do different jobs, and conflating them causes confusion.
- The CVE List is the catalog of records, each identifying a distinct vulnerability.
- The National Vulnerability Database (NVD), maintained by NIST, synchronizes with the CVE List and enriches each record with impact metrics, product identifiers, and a searchable index.
- OSV.dev is an open, distributed vulnerability database where each advisory comes from an authoritative source and stores affected versions in a machine-readable form that maps directly onto a developer's list of packages.
Software composition analysis (SCA) tools use these databases together. Matching a lockfile against OSV, for example, connects your exact package versions to the advisories that affect them, which produces fewer and more actionable results than a loose name match.
The software bill of materials as inventory
A software bill of materials (SBOM) is the complete, current inventory of every component in your application. CVE detection depends on it: you cannot find vulnerabilities in dependencies you have not inventoried. The SBOM is what makes open source vulnerability scanning repeatable rather than a one-time snapshot.
What scanners cannot see
Dependency scanning has real limits, and a good program names them. Scanners work from declared dependencies, so they miss code that was copied in directly, vendored without a manifest, or built without a lockfile. They cannot flag a flaw that has not yet been published as a CVE. And there is a lag between when a vulnerability is disclosed and when every database reflects it, which means a clean scan today is not a permanent guarantee.
Why do raw CVE counts fail?
A list of 400 CVEs tells you almost nothing about your actual risk. This is the trap teams fall into: they treat the count as the problem and burn capacity chasing numbers down instead of chasing exposure down.
Severity is not risk. A CVE's severity score, expressed through the Common Vulnerability Scoring System (CVSS), captures the principal technical characteristics of a flaw on a scale from 0 to 10. NVD itself states plainly that CVSS is not a measure of risk. A critical-rated vulnerability in a component your code never actually calls is a lower practical risk than a medium-rated one sitting directly in your request path.
The data itself carries noise. The CVE Program does not assign severity scores, a point it calls out directly as a common misconception. Enrichment comes later, from sources like NVD. And when a vendor or maintainer declines to supply details, NVD assigns metric values using a worst-case approach, so a vulnerability with no available detail can be scored as a 10.0. Treating every 10.0 as an emergency means treating missing information as a crisis.
The consequence is straightforward. Rank by count or by raw severity alone, and your team spends its time on the loudest findings rather than the ones an attacker can actually reach and use.
How should teams prioritize vulnerable dependencies?
Vulnerability prioritization combines several signals, because no single one answers the whole question. Severity tells you how bad a flaw is in theory. Exploitation likelihood tells you how probable real-world attacks are. Known-exploited status tells you whether attackers are using it right now. Reachability tells you whether your code even touches the vulnerable function. Together they turn a long list into a short one.
A few definitions worth keeping precise. The Exploit Prediction Scoring System (EPSS), maintained by the EPSS Special Interest Group at FIRST, is a machine-learning model that publishes a daily probability, from 0 to 1, that a given CVE will be exploited in the wild within the next 30 days. It estimates likelihood, not impact. The CISA Known Exploited Vulnerabilities catalog is the authoritative list of flaws with reliable evidence of active exploitation; inclusion requires a CVE identifier, evidence of exploitation in the wild, and a clear remediation action. Reachability analysis determines whether your code actually invokes the vulnerable function, which separates a theoretical exposure from a real one.
Used together, CVSS prioritization, EPSS, CISA KEV, and reachability move a team from "we have 400 CVEs" to "these eleven are reachable, exploited, and fixable this week."
Where does CVE detection fit in software supply chain security and third-party risk?
CVE detection is one layer of software supply chain security, not the whole of it. Known vulnerabilities in dependencies are a real risk, but they sit alongside others: malicious packages deliberately planted to compromise you, and license violations that create legal and compliance exposure. A useful view of third-party risk accounts for all three.
The components in question are the vendor and third-party code you did not author but still ship and still own. Container images add another layer beneath your dependencies, carrying operating system packages, runtimes, and libraries that code and dependency scans do not reach on their own.
The SBOM is where detection meets accountability. A current inventory, exportable in standard formats such as CycloneDX and SPDX, gives auditors and regulators the evidence they ask for and gives your own teams a single answer to "what are we running?" An SBOM supports the evidence that frameworks request; it does not by itself make an organization compliant with any of them.
The decisive shift is where the control sits. Reporting vulnerabilities after they merge leaves the exposure window open and the cleanup expensive. Stopping risky dependencies at the merge gate, before they enter the codebase, closes that window at the point where the fix is cheapest and the owner is already in context.
What does a good CVE detection program need?
Dependency risk is manageable when the program is built deliberately. Each element below does a distinct job, and each has a limit worth naming.
- A complete inventory, including transitive dependencies. You cannot protect what you have not cataloged. This does not cover code copied in without a manifest, which stays invisible to dependency tooling.
- Lockfile coverage across every project. Lockfiles pin exact versions so matches are precise. Projects built without one force looser matching and weaker results.
- Multiple prioritization signals. Severity, exploitation likelihood, known-exploited status, and reachability together separate real risk from noise. Any single signal on its own misleads.
- A gate at the pull request. Stopping risky dependencies before merge is cheaper and clearer than chasing them in production. A gate catches what enters going forward; it does not retroactively clear what already shipped.
- Re-checking after merge. New CVEs are published against code you already ship, so a component clean at merge can become vulnerable later. Continuous re-checking catches this; a one-time scan does not.
- Clear ownership and SLAs. Findings need an owner and a defined time to remediate, or they accumulate. Tooling surfaces the work; it does not assign accountability.
- Evidence retention. Keeping SBOMs and findings over time supports audits and incident response. Retention proves what you knew and when; it does not substitute for acting on it.
How can SonarQube Advanced Security help you detect and prioritize vulnerable dependencies?
SonarQube Advanced Security extends SonarQube's core security to the software supply chain, applying the same standard to third-party and open source dependencies that SonarQube applies to the code your team writes. It is an extension of the platform, not a standalone tool.
Its CVE detection identifies known vulnerabilities in open source code and prioritizes them by severity (CVSS) and exploitability (EPSS and KEV), with insights from the maintainer and which versions of a dependency are safe to upgrade to. The underlying software composition analysis matches your manifests and lockfiles against NVD, OSV, EPSS, and KEV to flag both vulnerable and malicious packages. Reachability analysis detects whether your code actually calls a vulnerable function and prioritizes accordingly; it currently supports Java and Kotlin, Python, and C# and VB.NET. Advanced SAST, a modern approach to SAST, extends dependency-aware taint analysis into your code's interactions with third-party libraries, supporting Java and C# with no configuration and no performance overhead.
Findings land in the pull request and the developer's workflow, from IDE to CI, where the fix happens rather than in a separate console. Malicious packages and license violations can fail the quality gate before they merge; confirm current CVE gating behavior with product documentation before relying on it. For inventory and evidence, SonarQube Advanced Security exports an SBOM for all dependencies in CycloneDX and SPDX formats and maintains a live inventory of dependencies, versions, and licenses. Its security reports include compliance reports for OWASP Top 10, CWE, PCI DSS, STIG, and more, which support the evidence frameworks such as the CRA, NIST SSDF, and SOC 2 ask for without claiming to deliver compliance on their own.
Container scanning, in open beta on SonarQube Cloud and included with SonarQube Advanced Security at no additional cost, extends the same checks to the operating system packages, runtimes, and libraries in the images you ship. SonarQube Advanced Security is available on SonarQube Cloud Team and Enterprise plans and SonarQube Server Enterprise. SBOMs.
