known_exploited_vulnerabilities_in_installed_packages

known_exploited_vulnerabilities_in_installed_packages fails while an installed Debian or Ubuntu package has a flaw that attackers are known to use. Such flaws are on CISA's list of known exploited vulnerabilities: CISA, the US cybersecurity agency, publishes the list for everyone.

A CVE ID identifies a security flaw. A source package holds the source code used to build binary packages.

Each affected CVE and source package gets its own finding and its own incident. The alert names the installed version, and says whether a fixed version waits to be installed, the fix needs Ubuntu Pro, or there is no fix yet.

Each run of the check asks two free public services, which need no account:

  • CISA's list, from CISA's own copy on GitHub, at raw.githubusercontent.com: MMWatchdog downloads the whole list of known exploited vulnerabilities. The download names none of the node's packages.
  • OSV.dev, at api.osv.dev: a public database of flaws in open source packages, which holds the flaw data of Debian and of Ubuntu. MMWatchdog sends OSV.dev the names of the node's source packages and the distribution release, including the release version, such as Debian:13. MMWatchdog sends no installed package versions. OSV.dev returns the flaws of each package and the versions that each flaw affects.

MMWatchdog compares the versions on the node. So neither service learns whether the server is patched.

Use apt_security_updates to find waiting security updates, reboot_after_updates to find a required restart, and distribution_release_security_support to find the end of free release support. The apt_security_updates, reboot_after_updates, and distribution_release_security_support checks read the node's update and support information. The update and support checks do not look for known exploited flaws.

The check covers the packages of Debian and Ubuntu. It does not cover packages from other apt repositories, programs downloaded or built from source, container images, or the libraries of your apps.

On the Red Hat family, such as Rocky Linux, AlmaLinux, and Fedora, and on SUSE, such as openSUSE Leap, the check is unknown: the vulnerability data that those distributions publish is too incomplete for a healthy result to mean anything. (The measurement behind this covered Rocky Linux, AlmaLinux, and openSUSE Leap; nobody measured Fedora's data, and the check stays unknown on Fedora, as on the rest of the family, until someone does.) There, dnf_security_updates and zypper_security_patches alert on every waiting security fix. Limits on each distribution says what was measured and what you can do.

Set up

The check needs no account and no key. The node needs what every Debian and Ubuntu server has: dpkg-query, apt-cache, and current apt package lists. The node also needs HTTPS access, on port 443, to raw.githubusercontent.com and api.osv.dev, with their certificates checked through the system trust store. If a firewall restricts internet access by host name, allow raw.githubusercontent.com and api.osv.dev.

Inputs

  • fail_when (an_installed_package_is_affected; required): The check fails while a flaw on CISA's list of known exploited vulnerabilities affects an installed package; write an_installed_package_is_affected, the only value.

When the check fails, and when it cannot check

  • The check fails for each flaw on CISA's list that affects the installed version of a source package, by OSV.dev's data for the node's release. Each finding has an ID such as CVE-2025-32463 sudo and opens its own incident. The finding's message names the CVE, the source package, the installed version, and the reason. The message also gives CISA's name of the flaw and the flaw's page at Debian's or Ubuntu's security tracker:

    CVE-2025-32463 in sudo 1.9.16p2-1: fixed version 1.9.16p2-3 waits to be installed (CISA: Sudo Inclusion of Functionality from Untrusted Control Sphere Vulnerability; https://security-tracker.debian.org/tracker/CVE-2025-32463)
    

    The reason is one of four:

    • fixed version VERSION waits to be installed: the release has a fix. Install the fixed package version with apt.
    • the fixed kernel VERSION is installed and runs after a reboot: only for the running kernel. A newer kernel that has the fix is installed, and the node still runs the old one. Reboot the node.
    • fix needs Ubuntu Pro, version VERSION: only Ubuntu Pro, Canonical's subscription for further security fixes, has a fix.
    • no fix yet: neither the release nor Ubuntu Pro has a fix. Decide how to protect the service until a fix becomes available.

    A flaw in the running kernel says so: in linux 6.12.38-1, the running kernel:. An installed fixed kernel counts only after the node boots it, so until then the finding stays and says to reboot:

    CVE-2026-53266 in linux 7.0.0-30.30, the running kernel: the fixed kernel 7.0.0-38.38 is installed and runs after a reboot (CISA: ...)
    

    For every package except the kernel, the installed version counts. Once the fix is installed, the finding resolves. A program that started before the update can still run the old code of a library until the program restarts. The known exploited flaws check does not look at running programs. A tool such as needrestart lists the services to restart, and reboot_after_updates says when the node needs a reboot.

  • The check is healthy when no flaw on CISA's list affects an installed version. An installed fix of Ubuntu Pro counts as fixed. The message names the date of CISA's list, the number of source packages, and the release:

    no installed package has a flaw on CISA's list of known exploited vulnerabilities of 2026-10-26: MMWatchdog searched OSV.dev for 297 source packages of Debian:13
    

    The healthy result says nothing about software outside the coverage above.

  • MMWatchdog cannot check, and the check is unknown, in each case listed below. Each unknown result has a message explaining the cause. An unknown result never counts as healthy:

    • The node runs neither Debian nor Ubuntu, or /etc/os-release names no VERSION_ID. A derivative counts as neither, even when its ID_LIKE names Debian or Ubuntu. On the Red Hat family and on SUSE, the message names the check that alerts on waiting security fixes there.
    • dpkg-query or apt-cache cannot be run, or ends with an error.
    • raw.githubusercontent.com or api.osv.dev cannot be reached, answers with an HTTP status other than 200, or gives an answer that cannot be read or is larger than 16 MiB.
    • OSV.dev knows no flaw at all of any of the node's source packages in the release. OSV.dev answers a release that it does not know as if every package had no flaw.
    • An OSV.dev record of a flaw has no entry for the package and the release by which OSV.dev found it, or its entry has no range of Debian versions.
  • A running kernel that is not from an installed package is left out. The message says that flaws in the unpackaged running kernel were not looked for.

After MMWatchdog starts, and after a maintenance window ends, the check runs at once, and until that run ends, a few minutes, the check is unknown: mmwatchdog status says waiting for a new run; the earlier result no longer counts, or has not run yet when the check has no earlier result, and the fleet view lists the node. A window that ends while a run is under way starts one more run, because the result of a run that began before the window's end no longer counts.

An unknown run opens a cannot-check incident after alert_after_failing_for, following the failing time.

Examples

A team with MMHotline's triage agent

# /etc/mmwatchdog/check_groups/installed_packages.yml
check_groups:
  installed_packages:
    check_every: 6h
    time_limit_per_run: 5m
    alert_after_failing_for: 5h
    recovered_after_healthy_for: 0s
    checks:
      known_exploited_flaws:
        known_exploited_vulnerabilities_in_installed_packages:
          fail_when: an_installed_package_is_affected
        alert_severity: warn

Every 6 hours, MMWatchdog on the node downloads CISA's list, asks OSV.dev for the flaws of the node's source packages, and compares the versions. A run takes a few minutes. When a flaw on the list affects a package, the run fails with that finding. If the next run, 6 hours later, still finds the flaw in the affected source package, the finding opens its own warn incident.

MMHotline's triage agent uses its policy file to raise an exploited flaw in a public service to SOS.

After the fix is installed, the first healthy run resolves the finding's incident.

If CISA or OSV.dev cannot answer one run, that run is unknown, and the next run asks again. An outage shorter than 6 hours opens no incident.

A team without a triage agent

Use the installed_packages check group from the preceding example, with alert_severity: sos in place of alert_severity: warn. MMHotline then calls the team for each confirmed known exploited flaw, without waiting for an agent to decide its urgency.

How it works

  1. Read ID, VERSION_ID, and VERSION from /etc/os-release, and name the release as OSV.dev does, by its ecosystem. Debian 13 is Debian:13. An Ubuntu release whose VERSION says LTS, such as Ubuntu 24.04, has two: Ubuntu:24.04:LTS, and Ubuntu:Pro:24.04:LTS for the fixes of Ubuntu Pro. Another Ubuntu release, such as 25.10, has only Ubuntu:25.10.

  2. Run dpkg-query once as the unprivileged mmwatchdog account. Keep installed binary packages and their versions, their source names and versions, and their Built-Using fields. A Built-Using field names additional source packages and versions used to build the binary. Remove duplicate rows from multiarch installations.

  3. Run apt-cache policy and one apt-cache madison for all installed binary names, as the unprivileged mmwatchdog account. Leave a binary out when no distribution archive offers the installed binary version and another origin offers the binary at any version. Distribution origins are exactly Debian, Ubuntu, UbuntuESM, and UbuntuESMApps. A superseded distribution version stays included when no other origin offers that binary.

  4. Read /proc/sys/kernel/osrelease and find its installed linux-image- package. The first Built-Using entry gives the running kernel's source and version; an empty field uses the image's own source and version. A Debian kernel writes its version at the end of /proc/version, such as Debian 6.12.113-1 (2026-10-15), and that version is the running one. That version takes precedence over other binaries of the kernel's source. Inactive image sources and sources identified by installed kernel headers or modules are left out; the standard linux source is asked about only for a packaged running kernel.

  5. For each other source package, use the lowest source version among its included binaries.

  6. Download CISA's list from https://raw.githubusercontent.com/cisagov/kev-data/main/known_exploited_vulnerabilities.json, and keep each entry's CVE ID and name, and the list's release date.

  7. Ask OSV.dev for the flaws of each source package in each ecosystem of the release, with POST https://api.osv.dev/v1/querybatch. One query holds only the package's name and the ecosystem:

    {"queries":[{"package":{"name":"sudo","ecosystem":"Debian:13"}},{"package":{"name":"openssh","ecosystem":"Debian:13"}}]}
    

    One request holds at most 1,000 queries. OSV.dev answers up to 1,000 flaw IDs for one query on one page. For each query with more results, OSV.dev returns a page token. MMWatchdog sends the query with the token in the next round of requests to fetch the next page. MMWatchdog continues until no query has more pages.

  8. Keep each flaw ID that names one CVE, such as DEBIAN-CVE-2024-6387 or UBUNTU-CVE-2024-42009, when that CVE is on CISA's list. Skip the IDs of advisories, such as DSA-, DLA-, USN-, and LSN-.

  9. Fetch each kept record once, with GET https://api.osv.dev/v1/vulns/ID. Read the fetched record's entries for the source package in the node's ecosystems. Process each range of Debian versions' events in order, using Debian's version ordering.

    An introduced version of 0 starts affected versions without a lower bound. Otherwise, the installed version must equal or exceed the introduced version to enter the affected range. A fixed version ends the range before the fixed version, so equality means fixed. A last_affected version ends the range after the named version, so equality remains affected and a higher installed version is unaffected.

  10. Decide whether each CVE affects each installed source package, and choose the reason for each finding. The installed version is healthy when an entry of any ecosystem says it is not affected. Otherwise the finding's reason comes from the release's own fixed version, then from Ubuntu Pro's, and is no fix yet without either.

The requests run one after another. MMWatchdog reads at most 16 MiB of each answer. Nothing waits or retries inside a run, and nothing is kept between runs: each run asks again.

Errors and what they mean

Message What the message means, and what to do
known_exploited_vulnerabilities_in_installed_packages.fail_when: is required: ... Write fail_when: an_installed_package_is_affected below known_exploited_vulnerabilities_in_installed_packages.
known_exploited_vulnerabilities_in_installed_packages.fail_when: expected one of an_installed_package_is_affected Use an_installed_package_is_affected, the only allowed value.
MMWatchdog cannot reach raw.githubusercontent.com for CISA's list of known exploited vulnerabilities: ... or MMWatchdog cannot reach api.osv.dev for ... Check the node's network, DNS, firewall, and trust store. The node needs HTTPS access to raw.githubusercontent.com and api.osv.dev.
raw.githubusercontent.com answered HTTP N for CISA's list of known exploited vulnerabilities or api.osv.dev answered HTTP N for ... The service gave an error, or a proxy between the node and the service did. The next run asks again.
CISA's list of known exploited vulnerabilities cannot be read: ..., OSV.dev's flaws of the installed source packages cannot be read: ..., or OSV.dev's record ID cannot be read: ... The answer was not what the service sends, such as a proxy's error page, or the service changed the form of its data. The next run asks again. If the message stays, the check needs a newer MMWatchdog.
OSV.dev knows no flaw of any of the N source packages in ECOSYSTEM, so it may not cover this release OSV.dev has no data for the release, such as a release that is newer than OSV.dev's data. Ask OSV.dev about one package by hand, with the ecosystem of the message: curl -s -d '{"package":{"name":"bash","ecosystem":"Debian:13"}}' https://api.osv.dev/v1/query. An answer of {} means that OSV.dev does not know the release yet.
MMWatchdog cannot read installed packages with dpkg-query: ... or ... with apt-cache: ... The package tool is missing or ended with an error, and the message gives what it wrote. Run the command of "How it works" by hand to see the whole answer.
MMWatchdog does not check NAME for known exploited flaws, because the vulnerability data of the Red Hat family is incomplete (see the page Limits on each distribution in the MMWatchdog documentation): the check dnf_security_updates alerts on every waiting security update The node runs a distribution of the Red Hat family, such as Rocky Linux or AlmaLinux. Use dnf_security_updates on the node, and see Limits on each distribution.
MMWatchdog does not check NAME for known exploited flaws, because the vulnerability data of this SUSE release is incomplete (see the page Limits on each distribution in the MMWatchdog documentation): the check zypper_security_patches alerts on every waiting security patch The node runs SUSE, such as openSUSE Leap. Use zypper_security_patches on the node, and see Limits on each distribution.
MMWatchdog does not know the installed packages of NAME: it knows only those of Debian and Ubuntu (see the page Limits on each distribution in the MMWatchdog documentation) The distribution is not one of MMWatchdog's targets, such as Arch Linux, or a derivative of Debian or Ubuntu.
/etc/os-release names no VERSION_ID, so MMWatchdog cannot find the release of this node The node runs a distribution without releases, such as Debian testing. The check covers releases only.

Tested on

Limits on each distribution says what MMWatchdog cannot do on each distribution, or did not test there, and why.

  • Go tests in server_checks_test.go, against one local stand-in for CISA and OSV.dev that answers as the two services do. TestKnownExploitedVulnerabilitiesInInstalledPackagesCheck covers package selection with apt origins, the running kernel, requests with names only, OSV.dev's pages, each rule of the events, the findings and their reasons, the healthy message, the 16 MiB limit, a release that OSV.dev does not know, each answer that cannot be used, and each service that cannot be reached. TestKnownExploitedVulnerabilitiesInBothUbuntuEcosystems covers both ecosystems of an Ubuntu LTS release, a fix of Ubuntu Pro alone, an installed fix of Ubuntu Pro, and an interim release. TestKnownExploitedVulnerabilitiesAskAtMostAThousandQueriesAtOnce covers a node with more than 1,000 source packages. TestUpdateChecksOnUnknownDistributions covers other distributions, and the primitive tests cover Debian's version ordering.
  • The node suite (node_scenarios.py) runs the check with the real guest's package tools on the Debian and Ubuntu releases of every target distribution, against one local HTTPS stand-in for both host names, trusted through the system trust store. Its flaws are built from the guest's real source packages, two flaw IDs to a page. It checks that the requests hold only names and the release's ecosystems, that a package from a vendor's repository is left out, the running kernel, the finding reasons (the fix of Ubuntu Pro on Ubuntu), the healthy result, the release that OSV.dev does not know, and an error of each service. On Arch Linux, openSUSE Leap, Rocky Linux, AlmaLinux, and Fedora, the suite checks only that the check is unknown with its message, which on openSUSE Leap, Rocky Linux, AlmaLinux, and Fedora names the check of the waiting fixes.
  • The validation record has a run against the real CISA list and the real OSV.dev.

Why it works this way

  • Only Debian and Ubuntu. Debian's and Ubuntu's data in OSV.dev records each flaw against each release, also a flaw that has no fix yet, so a healthy result means that no installed package has a known exploited flaw. The data that the Red Hat family and SUSE publish through OSV.dev holds advisories only, which appear when a fix ships, and in November 2026 it missed flaws or a whole release; Limits on each distribution gives the measurements. A healthy result there would sometimes be wrong, and the findings that remain are the waiting fixes that dnf_security_updates and zypper_security_patches already alert on. The answer changes when the data does: for openSUSE Leap, SUSE's own OVAL files at ftp.suse.com/pub/projects/security/oval/ record every flaw of the release, also the unfixed ones, and would make the check possible there with a second reader and a download of about 10 MB for each run.

  • Look for known exploitation. CISA's list names flaws that attackers use, a small set that calls for action. CISA's list held 1,758 flaws on 2026-10-26. On a Debian 13 server with 297 source packages, 48 flaws from CISA's list had affected an installed package at some time. Of the 48 flaws, 35 affected the kernel.

  • Read CISA's list from CISA's copy on GitHub. CISA's repository cisagov/kev-data mirrors the list of known exploited vulnerabilities published on CISA's website. On 2026-10-27, www.cisa.gov answered HTTP 403 to MMWatchdog on three servers in data centers, while CISA's copy on GitHub answered all three with the same file: the same version, date, and 1,758 entries. CISA's GitHub copy followed the website by about three hours on 2026-10-27, which a check every 6 hours does not notice.

  • Compare on the node, and send names only. OSV.dev could compare versions itself, but then it would learn which servers are not patched. Names only cost more pages, because OSV.dev returns every flaw of a package, also the fixed ones.

  • Read CISA's list and OSV.dev directly. CISA's list and OSV.dev are free and public. OSV.dev holds the flaw data of Debian's security tracker and of Ubuntu's security notices in one form. The check uses OSV.dev's API, not its downloadable files: on 2026-10-26, those files of a release held stale copies from 2024.

  • Ask about source packages. Debian and Ubuntu record flaws against the source package, which can build several installed binary packages.

  • Check the running kernel's source. A signed image's own source has no flaw records; Built-Using names the source that has flaw records, such as linux. Installing a fixed kernel without booting it still leaves the running kernel affected. When the flaw does not affect the newest installed kernel of the running kernel's source, the finding names that kernel, because the action is a reboot, not an install.

  • Read the running Debian kernel's version from /proc/version. Debian can update a kernel under its image's package name: in 2026, Debian 13 shipped the security fixes 6.12.74-2 and 6.12.90-2 that way. The package then has the new version while the node runs the old one until it reboots, and the package's version alone would hide the flaw. Ubuntu gives each kernel update that it releases a new image package name, so the package's version is the running one.

  • Use apt origins. A vendor's package can share a distribution package's name while using unrelated versions. Debian's security tracker does not cover backported versions, so Debian Backports is also left out.

  • Ask Ubuntu Pro's ecosystem too. Ubuntu files some flaws only there: on 2026-10-27, two flaws of roundcube in Ubuntu 24.04 on CISA's list were in Ubuntu:Pro:24.04:LTS alone. A fix of Ubuntu Pro is a fix that the team can install, so the finding says so, and an installed one is healthy. The release's own fix comes first, because it needs no subscription.

  • Records of one CVE, not advisories. CISA's list names CVEs, and the DEBIAN-CVE- and UBUNTU-CVE- records cover the same flaws as the advisories, one CVE each. Ubuntu's Livepatch notices (LSN-) patch a running kernel in memory and change no package version, so a version comparison cannot use them.

  • No flaw at all is unknown. OSV.dev answers a release that it does not know, such as Debian:99, with HTTP 200 and no flaws, as it answers a package without flaws. Every real release has flaws in some of its packages, so no flaw at all means no data. Flaws filed only under Ubuntu Pro do not count, because they do not show that OSV.dev knows the release.

  • A record without its entry is unknown. Leaving out an OSV.dev record with no matching package entry would hide the flaw. A rare unknown run is better than a flaw that is silently missed.

  • A run takes a few minutes. On 2026-10-26, asking OSV.dev about the 297 source packages of a Debian 13 server took 78 seconds; on 2026-11-15, two runs on a Debian 13 lab server took about 2.5 minutes each, almost all of it for the pages of the kernel's flaws: linux had 18,203 flaw IDs in Debian:13, 19 pages of about 3.7 seconds each. The 5-minute time limit leaves room for a slow day. The requests run one after another: a run every 6 hours does not need to be faster.

  • Every 6 hours, with an alert after 5. CISA adds a few flaws a week, and installing a fix takes longer than the check's delay. MMWatchdog stamps each observation, the result of a whole check run, when the run ends. A run's length changes by seconds with OSV.dev's answers. A wait of 5 hours lets the second failed run, about 6 hours after the first, always open the incident. A wait of exactly 6 hours could leave the incident to the third run, 12 hours later.

    One unknown run during a short outage of CISA or OSV.dev opens no incident, since the next run asks again.

  • No retries inside a run. The next run asks again, and an incident needs a lasting failure anyway.

  • Read up to 16 MiB of an answer. CISA's list was 1.8 MB with 1,758 entries on 2026-10-26, and it grows by a few hundred entries a year. One page of OSV.dev holds up to 1,000 flaw IDs for each query. 16 MiB leaves years of room and still bounds the memory of a run.

This page is docs/reference/modules/known_exploited_vulnerabilities_in_installed_packages.md in the MMWatchdog repository.