# Patch What Attackers Actually Use: A Nightly Check of Your Server Against CISA&#39;s Exploited List

A scanner found 26,929 vulnerability findings on one server. CISA&#39;s Known Exploited list cut that to 7 CVEs, none in the OS. A free script and the traps we hit.

Author: J.A. Watte
Published: December 4, 2026
Source: https://jwatte.com/blog/kev-nightly-cross-check-small-business/

---

A vulnerability scanner pointed at one ordinary Linux server reported 26,929 findings. That number is useless. Nobody patches 26,929 things, and most of them will never be attacked. CISA publishes a much shorter list: the [Known Exploited Vulnerabilities catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog), flaws that attackers have been seen using. It had 1,811 entries on December 3, 2026. Crossing the scanner output against that list every night turned 26,929 findings into 7 CVEs worth acting on.

This post explains how to set that up for free, what the first real run turned up, and the traps that would have made the report quietly wrong. The script is at the end and in a [download](/downloads/kev-check.py).

## Key takeaways

*   **Use KEV as a filter, not a scanner.** The catalog does not look at your systems. A scanner (we used the free, open source Trivy) lists what is vulnerable; KEV tells you which of those to fix first.
*   **The operating system was the clean part.** Zero KEV hits in the host's own packages, which get security updates automatically. All 7 CVEs were in container images and in project lockfiles, which no OS update touches.
*   **Count distinct CVEs, not rows.** The first run had 143 KEV rows. 129 of them were one test file copied into many working folders.
*   **A check that fails silently is worse than no check.** The script refuses to report "0 hits" if it could not load the KEV list or the scan did not run, and the pre-push gate treats "could not check" as a stop.
*   **Some hits have no fix yet.** Note them, reduce exposure, and watch for the update. They are still worth knowing about.

## What the KEV list is

CISA calls the catalog "the authoritative source of vulnerabilities that have been exploited in the wild." It started under Binding Operational Directive 22-01, which gives federal agencies a deadline to fix each entry. That deadline is the `dueDate` field. It does not bind a private business, but it is a sensible order to work in.

Each entry carries a CVE ID, the vendor and product, the date CISA added it, the due date, a short description, and a field called `knownRansomwareCampaignUse` that says whether the flaw is known to be used in ransomware campaigns. The whole list downloads as JSON or CSV. The JSON feed is at:

`https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json`

CISA also keeps a copy on GitHub in the [cisagov/kev-data](https://github.com/cisagov/kev-data) repository. Government sites sometimes refuse scripted downloads, so it helps to have a second source. On our run the direct feed answered normally.

## Why a scanner alone is not enough

Run any vulnerability scanner on a real server and you get thousands of findings, most of them low or medium severity, many with no fix available, many in libraries that are installed but never reachable from outside. Sorting by severity helps less than you would hope. Our first run had 56 distinct CVEs rated CRITICAL with a fix available that were not on the KEV list, against 7 that were. "Critical" is a rating of how bad a flaw could be. KEV records that someone is actually using it.

So the order is: KEV hits first (ransomware-flagged ones before the rest, then by due date), then critical findings with a fix, then everything else on your normal update cycle.

## The setup

Three pieces:

1.  **A scanner that understands both OS packages and language lockfiles.** We used [Trivy](https://trivy.dev), which reads Debian, Ubuntu and RHEL package databases, container images, and lockfiles such as `package-lock.json`, `requirements.txt` and `go.sum`.
2.  **The KEV JSON,** downloaded once per run, with the last good copy cached.
3.  **A small script** that runs the scanner, keeps only findings whose CVE ID is in the KEV list, and writes a short report.

On the server, the script runs from a systemd user timer at 03:30 UTC with a low CPU and disk priority, so it does not slow anything else down. The first full run covered the host, every running container image and 804 lockfiles in 509 project folders in 1 minute 17 seconds, using about 1.2 GB of memory at peak.

The same check runs as a gate before pushing code: scan only that project's lockfiles, and stop the push if anything on the KEV list is found.

## What the first run found

Seven distinct CVEs. None was ransomware-flagged. Here is what kind of places they were in, which is the useful part for anyone else running this:

*   **The host's own packages: none.** The server gets security updates automatically, including extended coverage for packages outside the main archive. That is the part of the system a normal update process maintains, and it showed.
*   **Container images: five CVEs.** A desktop image carried an old copy of a Python library in two places: a bundled tool environment and a package cache. The service that actually uses that library runs from its own, newer image and had no hit. Two other images carried an old compression library that their base image has since fixed. One browser engine library had a KEV entry with no fix released yet.
*   **Lockfiles: one CVE, 130 times.** An old version of a popular JavaScript library, pinned on purpose inside a test fixture, appeared once in each of 129 working copies of the same project, plus once in another project's fixtures.

None of these would have shown up from checking the operating system's update status. Container images are frozen at build time. Lockfiles are frozen at the moment someone ran the install. Both need to be rebuilt or bumped deliberately, and both are invisible to `apt` and `dnf`.

## The traps

### 1. A silent zero

The worst failure mode for a check like this is reporting "0 KEV hits" when it actually checked nothing: the feed failed to download, or the scanner crashed, or a path did not exist. Every one of those produces an empty list, and an empty list looks like good news.

The script guards against it three ways. If the download fails it uses the cached copy and says so, with the cache's age. If there is no cache either, it stops with exit code 2 instead of reporting. And the report lists every target scanned with its total number of findings, so "0 KEV hits" sits next to "26,929 vulnerability findings" and you can see the scan really ran.

### 2. A gate that a fallback defeats

The pre-push gate has three exit codes: 0 means no KEV hit, 1 means a KEV hit, 2 means it could not check. Anything other than 0 must stop the push. The tempting shortcut is to chain it like this:

```
(kev-gate || echo "gate unavailable") && git push
```

That pushes when the gate fails, because `echo` succeeds. We had exactly this bug earlier with a secret scanner: the scanner was missing from the PATH, the fallback printed a message, and the push went through unchecked. Run the gate as its own step, read the result, then push in a separate command.

### 3. Rows instead of CVEs

The first report had 143 KEV rows, which reads as alarming. 129 were the same test fixture. Group by CVE first, then list where each one appears. The script collapses identical rows, and the summary line gives both numbers.

### 4. Test fixtures that trip the gate

That same fixture means the gate would block every push to that project until someone decides what to do. There are two honest options: bump the fixture to a fixed version if the test does not need the old one, or exempt the fixtures folder from the gate and write down why. What you should not do is turn the gate off for the whole project because of one known, deliberate file.

### 5. Scanning a huge image the expensive way

Exporting a large container image to scan it can fill a small temporary filesystem. One desktop image on our server was 37 GB. Scanning the running container's mounted filesystem read-only instead took 11.8 seconds. For ordinary images, `trivy image name:tag` is fine.

### 6. Usage data on by default

Trivy 0.75's help text lists a flag to "disable sending anonymous usage data to Aqua," the company that maintains it. The script passes `--disable-telemetry` on every call. Check the defaults of any security tool you put on a server.

### 7. Running it as root

Scanning the whole host needs root to read every package database. That also means files the scanner writes to its cache can end up owned by root, and the next unprivileged run cannot update them. Pick one user for the scheduled job and keep the cache owned by that user.

## What to do with a hit

The report gives the fix for each row. Typical cases:

*   **An OS package on Ubuntu with Ubuntu Pro:** `sudo pro fix CVE-2026-XXXX` applies the fix for that CVE. Without Pro, a normal `apt` upgrade of the named package.
*   **An OS package on RHEL or Oracle Linux:** `dnf updateinfo list cves` shows which advisory fixes it, and `dnf update --advisory=<ID>` applies it.
*   **A container image:** pull or rebuild the image, then recreate the container. Updating packages inside a running container does not survive a restart.
*   **A lockfile:** bump the package to the fixed version, or add an override for a nested dependency, then reinstall and commit the new lockfile.
*   **No fix yet:** reduce exposure (is the vulnerable part reachable from the internet?) and check again tomorrow. The nightly report will show when a fixed version appears.

## The script

[kev-check.py](/downloads/kev-check.py) is a standalone Python 3 script with no dependencies beyond the standard library and Trivy. It is read-only: it scans and reports, and never installs, updates or restarts anything.

```
kev-check.py host                    scan this machine (run as root)
kev-check.py image NAME [NAME...]    scan container images
kev-check.py path DIR [DIR...]       scan lockfiles under a folder
kev-check.py gate DIR                exit 0 = no KEV hit, 1 = KEV hit, 2 = could not check
```

Options: `--kev-file FILE` to use a saved copy of the KEV JSON on a machine with no internet access, `--trivy PATH` if Trivy is not on the PATH, and `--json OUT` to save the results. We tested it against a folder with deliberately vulnerable lockfiles (8 KEV hits, 2 ransomware-flagged, exit 1), a clean project (exit 0), a missing folder (exit 2), a missing Trivy (exit 2) and a container image (1 KEV hit).

To run it nightly, put it in a systemd timer or cron job that writes the report to a dated file and sends you the summary line. Trivy downloads its own vulnerability database on first use, about 1.9 GB for the main database on our server, so the first run takes longer.

If you are building out the rest of a security routine, CISA's [34-goal checklist](/blog/cisa-cpg-2-security-self-assessment-small-business/) puts this under goal 2.B, "Mitigate Known Vulnerabilities."

## Related reading

*   [CISA's Free 34-Goal Security Checklist, Run on a One-Admin Business in an Afternoon](/blog/cisa-cpg-2-security-self-assessment-small-business/): where KEV fits in a full self-assessment.
*   [NASA Isn't the Only Agency Giving Software Away](/blog/free-government-software-beyond-nasa/): the KEV list among the other free government security tools.
*   [Your Vendor Is the Breach Path: Six Airlines, cPGuard and KEV Deadlines](/blog/vendor-breach-path-supply-chain-kev-deadlines/): what KEV due dates mean in practice.
*   [A Third of Our Server's Packages Had No Security Promise](/blog/ubuntu-pro-esm-free-security-updates/): why the host's own packages came out clean.
*   [The Check Was Green Because It Measured a State No Visitor Is Ever In](/blog/blog-green-checks-that-cannot-fail/): the silent-zero problem in general.

## Fact-check notes and sources

*   **KEV catalog:** [CISA Known Exploited Vulnerabilities Catalog](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) ("the authoritative source of vulnerabilities that have been exploited in the wild"); feed fields `cveID`, `vendorProject`, `product`, `dateAdded`, `dueDate`, `knownRansomwareCampaignUse` from the [JSON feed](https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json), catalog version 2026.12.03 with 1,811 entries, downloaded December 4, 2026 (UTC). Mirror: [cisagov/kev-data](https://github.com/cisagov/kev-data).
*   **BOD 22-01:** [CISA, Binding Operational Directive 22-01](https://www.cisa.gov/news-events/directives/bod-22-01-reducing-significant-risk-known-exploited-vulnerabilities), which created the catalog and its remediation deadlines for federal agencies.
*   **Trivy:** [trivy.dev](https://trivy.dev); version 0.75.0 help text for `--disable-telemetry`, `--scanners` and `--pkg-types`, read on our server December 4, 2026.
*   **Ubuntu Pro fix command:** `pro fix` is part of the Ubuntu Pro client; see [Ubuntu Pro client documentation](https://documentation.ubuntu.com/pro-client/en/latest/).
*   **Our run:** December 4, 2026 (UTC) on one Ubuntu 26.04 server: 26,929 findings on the host, 0 KEV hits in host packages, 143 KEV rows and 7 distinct CVEs in images and lockfiles, none ransomware-flagged, 56 distinct critical-with-fix CVEs not on KEV, 804 lockfiles in 509 folders, 1 minute 17 seconds, about 1.2 GB peak memory. Product names of the affected images are left out on purpose.

_This post is informational, not cybersecurity consulting advice. CISA and Aqua Security are named for identification only; no affiliation with or endorsement by either is implied._


---

Canonical HTML: https://jwatte.com/blog/kev-nightly-cross-check-small-business/
RSS: https://jwatte.com/feed.xml
JSON Feed: https://jwatte.com/feed.json
Hero image: https://jwatte.com/images/kev-nightly-cross-check-small-business.webp
