SAASMENT

Security skill · Fix

Critical patch prioritization (CISA KEV and EPSS).

Rank a backlog of CVEs for patching using CISA KEV status, EPSS exploit-probability scores, internet exposure, asset criticality, and compensating controls, then produce an ordered patch plan with deadlines. Use when many vulnerabilities compete for limited patch time or a new critical CVE needs a fast decision.

Download .zipInstall via MCPFixMIT
  • Vulnerability management

Facts

Category
Fix
License
MIT
Tags
  • Vulnerability management
Version
1.0.0
Last updated
2026-12-02
Folder
critical-patch-prioritization/
MCP resource
skill://critical-patch-prioritization/SKILL.md
Files
  • SKILL.md
  • LICENSE
  • references/prioritization-worksheet.md
  • scripts/kev_epss_lookup.py
Standards

Original Saasment content. Saasment is in early access; this skill does not require joining it.

Install via MCP or as files

Connect your client to https://www.saasment.com/api/mcp (see client setup) and call get_skill:

{
  "name": "get_skill",
  "arguments": {
    "slug": "critical-patch-prioritization"
  }
}

Or download the .zip and unpack it into your agent's skills directory:

Terminal, from your project root (user-level: ~/.cursor/skills)

mkdir -p .cursor/skills
curl -fsSL https://www.saasment.com/ai-security/skills/critical-patch-prioritization/download.zip -o /tmp/critical-patch-prioritization.zip
unzip -o /tmp/critical-patch-prioritization.zip -d .cursor/skills
# result: .cursor/skills/critical-patch-prioritization/SKILL.md

Review SKILL.md before enabling a skill. Skills are instructions your agent will follow.

SKILL.md

---
name: critical-patch-prioritization
description: Rank a backlog of CVEs for patching using CISA KEV status, EPSS exploit-probability scores, internet exposure, asset criticality, and compensating controls, then produce an ordered patch plan with deadlines. Use when many vulnerabilities compete for limited patch time or a new critical CVE needs a fast decision.
license: MIT
metadata:
  author: Saasment
  version: "1.0.0"
  category: fix
  tags: "vulnerability-management"
---

# Critical patch prioritization with CISA KEV and EPSS (fix)

License: MIT. Copyright (c) 2026 Saasment. Source: https://www.saasment.com/ai-security/skills/critical-patch-prioritization

CVSS describes severity in the abstract. Patch order should also reflect whether attackers are exploiting a flaw, how likely exploitation is, and how exposed the affected asset is. This skill combines public exploitation signals with your asset context to produce an ordered plan. It supports decisions; it does not replace judgment about your own environment.

## When to use

- You have a backlog of vulnerability findings and must choose what to patch first.
- A new CVE is announced and you need to decide how fast to act.
- You need to explain patch priorities and deadlines to engineering or leadership.

## Safe by default

- Only assess assets you own or are authorized to assess.
- Do not run exploit code to "prove" priority. Public exploitation signals plus asset context are enough to decide.
- The helper script in `scripts/kev_epss_lookup.py` sends only CVE ids to public services (CISA and FIRST). Do not add hostnames or asset data to those requests. Confirm that your network policy allows these lookups.
- Patch in a staged way with a rollback plan. Urgent does not mean untested.

## Signals used

- **CISA Known Exploited Vulnerabilities (KEV) catalog:** a CVE listed there has evidence of exploitation in the wild. Useful fields: `dateAdded`, `dueDate` (the remediation deadline CISA sets for US federal agencies, a reasonable benchmark for others), and `knownRansomwareCampaignUse`.
- **EPSS (Exploit Prediction Scoring System, from FIRST):** a probability that a CVE will be exploited in the next 30 days (`epss`, 0 to 1) and its percentile among all scored CVEs. EPSS is a statistical estimate. It can lag a brand-new vulnerability and does not know your environment.
- **CVSS:** use as a tiebreaker for impact, not as the main ordering key.
- **Your context:** is the asset reachable from the internet, does it hold sensitive data or critical function, is the vulnerable component actually used, and are there compensating controls (WAF rule, network isolation, feature disabled)?

CISA's BOD 26-04 (Prioritizing Security Updates Based on Risk) is an example of a framework that combines four variables: asset exposure, KEV status, exploit automation, and technical impact. You can mirror those questions in your own policy even if you are not subject to the directive.

## Procedure

1. **Collect findings** with the affected asset, component, and CVE id. Export from your scanner (see the `dependency-cve-triage-and-patch` skill). Deduplicate by CVE and asset.
2. **Tag assets** with exposure (internet-facing or internal), criticality (high, medium, low), and environment (production or not). Keep the tags in the same sheet. Use `references/prioritization-worksheet.md`.
3. **Look up signals** for every CVE. Run `python3 scripts/kev_epss_lookup.py --json CVE-... CVE-...` or read the KEV JSON and the EPSS API directly.
4. **Assign a tier** using the default rules below. Adjust only with a written reason.
   - **Tier 0, emergency:** in KEV and the asset is internet-facing, or in KEV with ransomware use "Known". Act within days, start containment (disable, restrict, or mitigate) immediately if a patch is not ready, and check for signs of compromise.
   - **Tier 1, urgent:** in KEV on an internal asset, or EPSS at or above 0.1 (10%) on an internet-facing asset, or critical severity with a reachable attack path on a high-criticality asset.
   - **Tier 2, scheduled:** EPSS between about 0.01 and 0.1 or high severity on exposed assets. Patch in the normal fast cycle.
   - **Tier 3, routine:** low EPSS, not in KEV, not exposed, or the vulnerable code is not used. Patch with regular maintenance, or document acceptance.
   These thresholds are starting points. Calibrate them against your team's capacity and review them regularly.
5. **Set target dates** per tier (for example Tier 0 in days, Tier 1 in 1 to 2 weeks, Tier 2 in 30 days, Tier 3 in a regular release). Use the KEV `dueDate` as an upper bound for KEV items.
6. **Plan mitigations while waiting.** For each Tier 0 or Tier 1 item without an available or safe patch: restrict network access, disable the vulnerable feature, add a virtual patch rule, or increase monitoring. Record the mitigation and an expiry date.
7. **Execute and track.** Patch in order, test, deploy, and update the sheet. Re-run the signal lookup weekly, because KEV additions and EPSS scores change.
8. **Close the loop.** Confirm each item is fixed with a rescan, and log the date from KEV addition (or disclosure) to remediation. Use that time to improve your process.

## Verification

- Re-run the scanner and confirm the patched CVEs no longer appear on the affected assets.
- Re-run the KEV and EPSS lookup and confirm that no Tier 0 or Tier 1 item is open without a documented mitigation and date.
- Spot check three tier assignments against the rules to confirm the sheet is consistent.
- For Tier 0 items, confirm that logs and detections were reviewed for exploitation attempts in the exposure window.

## Reporting

Provide the ordered list with CVE, asset, tier, KEV (yes or no), EPSS and date retrieved, mitigation, owner, and target date. State the data retrieval date, because both KEV and EPSS change.

## References

- CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- FIRST EPSS: https://www.first.org/epss/
- CISA BOD 26-04: https://www.cisa.gov/news-events/directives/bod-26-04-prioritizing-security-updates-based-risk
- Companion skill: `dependency-cve-triage-and-patch`.

Helper files

LICENSE
MIT License

Copyright (c) 2026 Saasment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
references/prioritization-worksheet.md
# Prioritization worksheet

License: MIT. Copyright (c) 2026 Saasment.

Copy this table into a spreadsheet or issue. One row per CVE and asset pair.

| CVE | Asset | Exposure | Criticality | In KEV | Ransomware use | EPSS (date) | CVSS | Reachable | Tier | Mitigation (expiry) | Owner | Target date | Status |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| CVE-XXXX-XXXXX | web-1 | internet | high | yes | Known | 0.9400 (2026-12-01) | 9.8 | yes | 0 | WAF rule (7 days) | name | date | open |

## Decision rules (defaults, adjust with a written reason)

1. In KEV and internet-facing: Tier 0.
2. In KEV with ransomware use "Known": Tier 0.
3. In KEV and internal: Tier 1.
4. EPSS 0.1 or higher and internet-facing: Tier 1.
5. Critical severity, reachable attack path, high-criticality asset: Tier 1.
6. EPSS 0.01 to 0.1, or high severity on an exposed asset: Tier 2.
7. Everything else: Tier 3, or accept with an owner and review date.

## Questions to answer for every Tier 0 and Tier 1 item

- Is there a vendor fix, and has it been tested in staging?
- If not patchable today, what reduces exposure now (isolation, feature off, rule, credential rotation)?
- Is there any sign of exploitation in logs since the KEV addition or disclosure date?
- Who approves a risk acceptance, and when is it reviewed?

## Lookup commands

```bash
# Table output
python3 scripts/kev_epss_lookup.py CVE-2021-44228 CVE-2023-4863

# JSON for a spreadsheet or script, ids from a file (one per line)
python3 scripts/kev_epss_lookup.py --json < cves.txt
```

Direct API calls (only CVE ids are sent):

```bash
curl -s "https://api.first.org/data/v1/epss?cve=CVE-2021-44228"
curl -s https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
```
scripts/kev_epss_lookup.py
#!/usr/bin/env python3
"""Look up CISA KEV status and FIRST EPSS scores for a list of CVE ids.

License: MIT. Copyright (c) 2026 Saasment.

Usage:
    python3 kev_epss_lookup.py CVE-2021-44228 CVE-2023-4863
    cat cves.txt | python3 kev_epss_lookup.py --json

Network access: this script sends only the CVE ids you provide to
https://api.first.org (EPSS) and downloads the public KEV catalog from
https://www.cisa.gov. It sends no hostnames, asset names, or other data about
your environment. Review that before running it on a restricted network.
"""

import argparse
import json
import re
import sys
import urllib.error
import urllib.parse
import urllib.request

KEV_URL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
EPSS_URL = "https://api.first.org/data/v1/epss"
CVE_RE = re.compile(r"^CVE-\d{4}-\d{4,}$")
BATCH = 50
TIMEOUT = 30


def fetch_json(url):
    request = urllib.request.Request(url, headers={"User-Agent": "saasment-kev-epss-lookup/1.0"})
    with urllib.request.urlopen(request, timeout=TIMEOUT) as response:
        return json.load(response)


def load_kev():
    catalog = fetch_json(KEV_URL)
    return {item["cveID"]: item for item in catalog.get("vulnerabilities", [])}


def load_epss(cves):
    scores = {}
    for start in range(0, len(cves), BATCH):
        chunk = cves[start : start + BATCH]
        query = urllib.parse.urlencode({"cve": ",".join(chunk)})
        payload = fetch_json(f"{EPSS_URL}?{query}")
        for row in payload.get("data", []):
            scores[row["cve"]] = {
                "epss": float(row["epss"]),
                "percentile": float(row["percentile"]),
                "date": row.get("date"),
            }
    return scores


def parse_ids(raw):
    ids = []
    for token in raw:
        value = token.strip().upper()
        if not value:
            continue
        if not CVE_RE.match(value):
            print(f"skipping invalid CVE id: {token!r}", file=sys.stderr)
            continue
        if value not in ids:
            ids.append(value)
    return ids


def main():
    parser = argparse.ArgumentParser(description=__doc__.split("\n")[0])
    parser.add_argument("cves", nargs="*", help="CVE ids; read from stdin when omitted")
    parser.add_argument("--json", action="store_true", help="print JSON instead of a table")
    args = parser.parse_args()

    raw = args.cves or re.split(r"[\s,]+", sys.stdin.read())
    cves = parse_ids(raw)
    if not cves:
        print("no valid CVE ids provided", file=sys.stderr)
        return 2

    try:
        kev = load_kev()
        epss = load_epss(cves)
    except (urllib.error.URLError, TimeoutError, ValueError, KeyError) as error:
        print(f"lookup failed: {error}", file=sys.stderr)
        return 1

    rows = []
    for cve in cves:
        entry = kev.get(cve)
        score = epss.get(cve)
        rows.append(
            {
                "cve": cve,
                "in_kev": entry is not None,
                "kev_date_added": entry.get("dateAdded") if entry else None,
                "kev_due_date": entry.get("dueDate") if entry else None,
                "kev_ransomware_use": entry.get("knownRansomwareCampaignUse") if entry else None,
                "epss": score["epss"] if score else None,
                "epss_percentile": score["percentile"] if score else None,
                "epss_date": score["date"] if score else None,
            }
        )

    rows.sort(key=lambda r: (not r["in_kev"], -(r["epss"] or 0.0)))

    if args.json:
        json.dump(rows, sys.stdout, indent=2)
        print()
        return 0

    print(f"{'CVE':<18} {'KEV':<4} {'EPSS':<8} {'PCTL':<8} KEV added / due")
    for r in rows:
        epss_text = f"{r['epss']:.4f}" if r["epss"] is not None else "n/a"
        pct_text = f"{r['epss_percentile']:.4f}" if r["epss_percentile"] is not None else "n/a"
        kev_text = f"{r['kev_date_added']} / {r['kev_due_date']}" if r["in_kev"] else "-"
        print(f"{r['cve']:<18} {'yes' if r['in_kev'] else 'no':<4} {epss_text:<8} {pct_text:<8} {kev_text}")
    return 0


if __name__ == "__main__":
    sys.exit(main())

Related

Companion skills

Questions

How do I install the Critical patch prioritization (CISA KEV and EPSS) skill?

Download https://www.saasment.com/ai-security/skills/critical-patch-prioritization/download.zip and unzip it into your agent's skills directory (for example .cursor/skills, .claude/skills, .agents/skills, or .github/skills) so that critical-patch-prioritization/SKILL.md exists. Or connect to https://www.saasment.com/api/mcp and call the get_skill tool with the slug critical-patch-prioritization.

What license is the Critical patch prioritization (CISA KEV and EPSS) skill under?

It is original Saasment content under the MIT license, stated in the SKILL.md frontmatter and in the LICENSE file in the skill folder.

Is it safe to run this skill?

A skill is a set of instructions your agent follows, so read SKILL.md first. It tells the agent to test only systems you own or are authorized to test, to use test environments and synthetic data, and to avoid destructive probes. Downloading it does not run any code on your machine.

← All security skills

Try the platform.

Open the demo workspace with mock data. No login. Register from the banner when you want early access. No security team. No call.

Try the platform