Which flaws are attackers using?
EPSS, the Exploit Prediction Scoring System, estimates how likely a CVE is to be exploited soon. The KEV catalogue lists the CVEs already known to be exploited.
CVSS says how bad a flaw could be. These two say whether anyone is using it, which changes what you fix first.
By the end of this lesson
Note
I can rank vulnerabilities using EPSS and the KEV catalogue beside CVSS.
Key words
| Word | What it means | Example |
|---|---|---|
| Exploit | code or steps that use a vulnerability | |
| EPSS | a daily estimate of the chance a CVE is exploited soon | 0.59304 |
| Percentile | the share of scored CVEs at or below this score | 0.99141 |
| KEV catalogue | CISA's list of vulnerabilities known to be exploited | |
| Snapshot | a copy of data frozen on one date |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
4 questionsEPSS estimates the chance of exploitation
EPSS is published every day by FIRST, the Forum of Incident Response and Security Teams. For each CVE it gives a probability from 0 to 1 that exploitation will be seen in the next 30 days.
The percentile says how a score compares: 0.99 means it is higher than 99% of all scored CVEs. This lab carries the scores of 20 November 2026, for 410,485 CVEs.
Write the helper that reads reports, part 1
docker exec tools sh -c "printf '%s\n' 'import csv' 'import gzip' 'import json' '' 'EPSS_FILE = \"/work/snapshot/epss-2026-11-20.csv.gz\"' 'KEV_FILE = \"/work/snapshot/kev-2026-11-20.json\"' '' 'def findings(name):' ' with open(\"/work/reports/\" + name + \".json\") as f:' ' report = json.load(f)' ' rows = []' ' for result in report.get(\"Results\", []):' ' rows = rows + (result.get(\"Vulnerabilities\") or [])' ' return rows' '' 'def cve_list(rows):' ' cves = []' ' for v in rows:' ' if v[\"VulnerabilityID\"] not in cves:' ' cves.append(v[\"VulnerabilityID\"])' > steps/snap.py"Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Write the helper that reads reports, part 2
docker exec tools sh -c "printf '%s\n' ' return cves' '' 'def epss(wanted):' ' scores = {}' ' with gzip.open(EPSS_FILE, \"rt\") as f:' ' for row in csv.reader(f):' ' if row[0] in wanted:' ' scores[row[0]] = [float(row[1]), float(row[2])]' ' return scores' '' 'def kev():' ' with open(KEV_FILE) as f:' ' catalogue = json.load(f)' ' return {v[\"cveID\"]: v for v in catalogue[\"vulnerabilities\"]}' '' 'def nvd(v):' ' return v.get(\"CVSS\", {}).get(\"nvd\", {}).get(\"V3Score\")' >> steps/snap.py"Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Write the EPSS and KEV lookup
docker exec tools sh -c "printf '%s\n' 'import sys' 'import snap' '' 'wanted = sys.argv[1:]' 'scores = snap.epss(wanted)' 'catalogue = snap.kev()' 'for cve in wanted:' ' print(cve, \"EPSS\", scores[cve][0], \"percentile\", scores[cve][1])' ' if cve in catalogue:' ' k = catalogue[cve]' ' print(\" \", \"in KEV, added\", k[\"dateAdded\"], \"due\", k[\"dueDate\"], \"ransomware\", k[\"knownRansomwareCampaignUse\"])' ' else:' ' print(\" \", \"not in KEV\")' > steps/lookup.py"Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Look up a low and a critical CVE
docker exec tools python3 steps/lookup.py CVE-2024-2511 CVE-2024-45492Shown here, not run. Press Start lab to type it into your own lab’s terminal.
What lookup.py printed, beside the severity
| CVE | Severity | CVSS (NVD) | EPSS | Percentile |
|---|---|---|---|---|
| CVE-2024-2511 | LOW | none | 0.59304 | 0.99141 |
| CVE-2024-45492 | CRITICAL | 9.8 | 0.01393 | 0.73038 |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsTry it: sort by CVSS, then by EPSS
findings = [
["CVE-2024-45492", "CRITICAL", 9.8, 0.01393],
["CVE-2024-2511", "LOW", 0, 0.59304],
["CVE-2024-6119", "HIGH", 7.5, 0.66582],
]
by_cvss = sorted(findings, key=lambda f: f[2], reverse=True)
by_epss = sorted(findings, key=lambda f: f[3], reverse=True)
print("by CVSS:", [f[0] for f in by_cvss])
print("by EPSS:", [f[0] for f in by_epss])
# CVE-2024-2511 has no NVD score here, so it sorts last by CVSS.
# Change its EPSS to 0.001. Where does it go in each list?
Make a free account to save your work and track your progress.
KEV lists what is already exploited
The KEV catalogue is kept by CISA, the US Cybersecurity and Infrastructure Security Agency. A CVE joins it when there is reliable evidence of exploitation and a clear action, usually an update.
Each entry has the date it was added and a due date for US federal agencies. It also says whether ransomware gangs are known to use it. This lab carries version 2026.11.20, with 1,790 entries.
Look up Log4Shell in the catalogue
docker exec tools python3 steps/lookup.py CVE-2021-44228Shown here, not run. Press Start lab to type it into your own lab’s terminal.
The KEV entry lookup.py printed
| CVE | EPSS | Added | Due | Ransomware use |
|---|---|---|---|---|
| CVE-2021-44228 | 0.99999 | 2021-12-10 | 2021-12-24 | Known |
The cells students fill in are left blank in this preview.
A common mistake
Warning
Many people think a CVE missing from KEV is safe. KEV lists only what CISA has evidence for. A flaw can be exploited before it is listed, so absence is a reason to look at EPSS, not to relax.
Your turn: look up its follow-up flaw
docker exec tools python3 steps/lookup.py CVE-2021-45046Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Put KEV, EPSS and CVSS together
One simple rule, written for this lesson and not a standard, uses all three. Tier 1 is anything in KEV. Tier 2 is an EPSS of 0.1 or more. Tier 3 is a CVSS of 9 or more. Everything else is tier 4.
Run it on the old web image and on the Java reports service. Watch where the critical CVEs land.
Save the old image's scan as JSON
docker exec scanner trivy image --input /targets/web-1.25.3.tar --format json -o /work/reports/web.jsonShown here, not run. Press Start lab to type it into your own lab’s terminal.
Scan the Java service's lock file
docker exec scanner trivy fs /targets/reports --format json -o /work/reports/reports.jsonShown here, not run. Press Start lab to type it into your own lab’s terminal.
Write the ranking script, part 1
docker exec tools sh -c "printf '%s\n' 'import sys' 'import snap' '' 'rows = snap.findings(sys.argv[1])' 'cves = snap.cve_list(rows)' 'scores = snap.epss(cves)' 'catalogue = snap.kev()' 'best = {}' 'for v in rows:' ' cve = v[\"VulnerabilityID\"]' ' chance = scores.get(cve, [0, 0])[0]' ' cvss = snap.nvd(v) or 0' ' if cve in catalogue:' ' tier = 1' ' elif chance >= 0.1:' ' tier = 2' ' elif cvss >= 9.0:' ' tier = 3' ' else:' ' tier = 4' > steps/rank.py"Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Write the ranking script, part 2
docker exec tools sh -c "printf '%s\n' ' best[cve] = [tier, -chance, cve, v[\"Severity\"], snap.nvd(v), chance]' 'counts = [0, 0, 0, 0]' 'for row in best.values():' ' counts[row[0] - 1] = counts[row[0] - 1] + 1' 'print(len(best), \"CVEs.\", \"Tiers 1 to 4:\", counts)' 'for row in sorted(best.values())[:6]:' ' print(\"tier\", row[0], row[2], row[3], \"CVSS\", row[4], \"EPSS\", row[5])' >> steps/rank.py"Shown here, not run. Press Start lab to type it into your own lab’s terminal.
Rank the old web image
docker exec tools python3 steps/rank.py webShown here, not run. Press Start lab to type it into your own lab’s terminal.
Rank the Java service
docker exec tools python3 steps/rank.py reportsShown here, not run. Press Start lab to type it into your own lab’s terminal.
What rank.py printed
| Target | CVEs | Tier 1 | Tier 2 | Tier 3 | Tier 4 | First in the list |
|---|---|---|---|---|---|---|
| web | 44 | 0 | 5 | 3 | 36 | CVE-2024-6119, EPSS 0.66582 |
| reports | 23 | 2 | 2 | 0 | 19 | CVE-2021-44228, in KEV |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsAssignment: rank findings into tiers
Rank findings with the lesson's four tiers. Each finding is a dictionary with cve, cvss, epss and kev (True or False).
tier(cvss, epss, in_kev) returns 1 for anything in KEV, 2 for an EPSS of 0.1 or more, 3 for a CVSS of 9.0 or more, and 4 otherwise. count_tiers(findings) returns a list of four counts, tier 1 first. first_to_fix(findings) returns the CVE in the best tier; between two in the same tier, the one with the higher EPSS.
def tier(cvss, epss, in_kev):
return 0
def count_tiers(findings):
return [0, 0, 0, 0]
def first_to_fix(findings):
return ""
Make a free account to save your work and track your progress.
Exit quiz
Have a go