Vulnerability Data: CVE, GHSA, OSV, EPSS & KEV
A scanner is a join: components (from an SBOM) × advisories (from a database). Its results can only be as good as both sides. This lesson is about the second side: where advisories come from, what the identifiers mean, and which numbers help you decide what to fix first.
Identifiers
| Id | Issued by | Scope | Example |
|---|---|---|---|
| CVE | the CVE Program (MITRE + many CVE Numbering Authorities) | one vulnerability, any product | CVE-2021-44228 (Log4Shell) |
| GHSA | GitHub Security Advisories | open-source packages in the ecosystems GitHub tracks, reviewed, with exact affected version ranges | GHSA-jfh8-c2jp-5v3q (the same Log4Shell) |
| OSV id | the OSV schema, used by many databases | per-ecosystem advisories in one JSON format | PYSEC-…, GO-2022-…, RUSTSEC-…, MAL-… (malicious packages) |
| Distribution ids | Debian, Ubuntu, Red Hat, Alpine… | their packages, with their fixed versions (backports!) | DSA-…, USN-…, RHSA-… |
One vulnerability usually has several ids, linked as aliases. Grype reports the id of the record it matched (a GHSA for language packages) unless you ask for --by-cve:
grype sbom:/opt/samples/sbom/legacy-service.cdx.json -q -o json \
| jq -r '.matches[] | select(.artifact.name == "log4j-core") | "\(.vulnerability.id) aliases: \([.relatedVulnerabilities[].id] | join(",")) fixed in \(.vulnerability.fix.versions | join(","))"'GHSA-jfh8-c2jp-5v3q aliases: CVE-2021-44228 fixed in 2.15.0
GHSA-7rjr-3q55-vv33 aliases: CVE-2021-45046 fixed in 2.16.0
GHSA-p6xc-xr62-6r2g aliases: CVE-2021-45105 fixed in 2.17.0
GHSA-8489-44mv-ggj8 aliases: CVE-2021-44832 fixed in 2.17.1
GHSA-3pxv-7cmr-fjr4 aliases: CVE-2026-34480 fixed in 2.25.4
GHSA-vc5p-v9hr-52mj aliases: CVE-2025-68161 fixed in 2.25.3
GHSA-6hg6-v5c8-fphq aliases: CVE-2026-34477 fixed in 2.25.4
Those are the four Log4j 2 CVEs of December 2021 (Log4Shell and its follow-ups), each fixed in a later 2.x release; at the time this image was built the database also listed three newer, medium-severity log4j-core advisories. When you search, filter or write ignore rules and VEX, make sure you use the id your scanner reports, or list the aliases.
Where the databases come from
| Source | What it adds |
|---|---|
| NVD (US NIST) | CVSS scores and CPE-based affected-product data for CVEs. Since early 2024 NVD has had a large backlog of unanalysed CVEs, so many recent CVEs have no NVD score or CPE yet |
| GitHub Advisory Database | reviewed advisories for npm, PyPI, Maven, Go, RubyGems, NuGet, Rust, Composer, … with precise version ranges |
| OSV.dev | aggregates ecosystem databases (PyPA, Go, RustSec, GHSA, distributions) in the OSV format |
| Distribution security trackers | which distribution package versions are fixed, including backported patches |
| CISA KEV | the Known Exploited Vulnerabilities catalog: CVEs with evidence of exploitation in the wild |
| EPSS (FIRST) | a daily probability (0–1) that a CVE will be exploited in the next 30 days |
Grype's database is built by Anchore from these feeds (its vunnel tool); Trivy's by Aqua (trivy-db). Both download a fresh copy daily. The sessions in this course use copies frozen when the course image was built.
Reading the numbers
grype sbom:/opt/samples/sbom/legacy-service.cdx.json -q --by-cve -o json \
| jq -r '.matches[] | select(.artifact.name == "log4j-core") | .vulnerability
| "\(.id) \(.severity) CVSS \([.cvss[].metrics.baseScore] | max // "-") EPSS \(.epss[0].epss // 0 | . * 100 | floor)% KEV \(.knownExploited[0].dateAdded // "no")"'CVE-2021-44228 Critical CVSS 10 EPSS 99% KEV 2021-12-10
CVE-2021-45046 Critical CVSS 9 EPSS 99% KEV 2023-05-01
CVE-2021-45105 High CVSS 8.6 EPSS 99% KEV no
CVE-2021-44832 Medium CVSS 6.6 EPSS 97% KEV no
CVE-2026-34480 Medium CVSS 6.9 EPSS 1% KEV no
CVE-2025-68161 Medium CVSS 6.3 EPSS 0% KEV no
CVE-2026-34477 Medium CVSS 6.3 EPSS 0% KEV no
| Number | Answers | Use |
|---|---|---|
| Severity / CVSS base score (0–10) | how bad is it in the worst case? | a rough first filter; it ignores your context |
| EPSS (probability) | how likely is exploitation soon? | prioritise inside one severity level |
| KEV (yes/no) | is it being exploited right now? | fix first, whatever the score |
| Fix available | can I just upgrade? | cheap wins first (--only-fixed) |
Log4Shell scores 10.0, has an EPSS near 100% and was added to KEV on 10 December 2021, the day its CVE was published: there is nothing to discuss. Most findings are much less clear, which is why Grype prints a combined risk column and why the next lessons are about filtering and context. These values change daily; the ones above are what the frozen database contained.
A model: OSV version ranges
An OSV advisory states affected versions as events on a version line: introduced starts an affected range, fixed ends it. Matching a package means comparing versions correctly (numerically, per ecosystem rules). This model uses the ranges of two real npm advisories:
def parse(v):
return tuple(int(x) for x in v.split("."))
ADVISORIES = {
# minimist prototype pollution: two release lines were fixed separately
"GHSA-xvch-5gv4-984h": {"package": "minimist", "ranges": [
[{"introduced": "0"}, {"fixed": "0.2.4"}],
[{"introduced": "1.0.0"}, {"fixed": "1.2.6"}]]},
# lodash command injection in template()
"GHSA-35jh-r3h4-6jhm": {"package": "lodash", "ranges": [
[{"introduced": "0"}, {"fixed": "4.17.21"}]]},
}
def affected(version, ranges):
v = parse(version)
for events in ranges:
lo = parse(events[0]["introduced"] if events[0]["introduced"] != "0" else "0.0.0")
hi = parse(events[1]["fixed"])
if lo <= v < hi:
return True
return False
installed = [("minimist", "0.2.3"), ("minimist", "0.2.4"), ("minimist", "1.2.5"),
("minimist", "1.2.6"), ("lodash", "4.17.9"), ("lodash", "4.17.21")]
for name, version in installed:
hits = [gid for gid, adv in ADVISORIES.items() if adv["package"] == name and affected(version, adv["ranges"])]
print(f"{name}@{version:8} {'VULNERABLE ' + ', '.join(hits) if hits else 'ok'}")
print("string compare would say 4.17.9 >= 4.17.21:", "4.17.9" >= "4.17.21")minimist@0.2.3 VULNERABLE GHSA-xvch-5gv4-984h
minimist@0.2.4 ok
minimist@1.2.5 VULNERABLE GHSA-xvch-5gv4-984h
minimist@1.2.6 ok
lodash@4.17.9 VULNERABLE GHSA-35jh-r3h4-6jhm
lodash@4.17.21 ok
string compare would say 4.17.9 >= 4.17.21: True
The last line is the classic bug: as strings, "4.17.9" sorts after "4.17.21". Every ecosystem has its own comparison rules (semver for npm, PEP 440 for Python, Debian's epochs and ~, Alpine's -r revisions), and scanners implement each one.
Go further: EPSS and the CISA KEV Catalog shows how to reorder findings by likely exploitation, not by CVSS alone.
Test yourself
Grype reports GHSA-jfh8-c2jp-5v3q and your ticket mentions CVE-2021-44228. What is the relationship?
- Two different vulnerabilities
- The same vulnerability under two ids (aliases)
- The GHSA is the fix
- The CVE is for Java, the GHSA for npm
Which signal says a vulnerability is being exploited in the wild right now?
- CVSS base score
- EPSS
- Presence in CISA's KEV catalog
- The fixed version
An advisory has ranges introduced 1.0.0 / fixed 1.2.6. Is 1.2.10 affected?
- Yes, because "1.2.10" < "1.2.6" as strings
- No, because 1.2.10 > 1.2.6 numerically
- Only on Windows
- It depends on EPSS