# MSP Product CVE, KEV & EPSS Alerts (NIS2 / CRA) (`vesper_studio/msp-product-cve-alerts`) Actor

Monitor MSP client appliances & software (FortiOS, Synology DSM, SonicOS, ESXi, Exchange, Veeam, WordPress, npm/PyPI) against NVD v2, OSV.dev, GitHub Advisories, CISA KEV & FIRST.org EPSS (93-100% fill) with strict version-range matching & delta alerts in 256 MB RAM.

- **URL**: https://apify.com/vesper_studio/msp-product-cve-alerts.md
- **Developed by:** [Xavier Richard](https://apify.com/vesper_studio) (community)
- **Categories:** Developer tools, Automation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 matched cve / ghsa alerts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## MSP Product CVE & KEV Alerts (`msp-product-cve-alerts`)

Monitor **deployed client appliances, firewalls, NAS, VPNs, hypervisors, servers, and software stacks** (Fortinet FortiOS, Synology DSM, SonicWall SonicOS, VMware ESXi, Microsoft Exchange, Veeam, WordPress, Debian, npm/PyPI/Composer) against official vulnerability feeds — built for **Managed Service Providers (MSPs)**, **SOC/IT teams**, and **NIS2 / EU Cyber Resilience Act (CRA)** compliance workflows.

Unlike the 140+ code-repository scanners focused on `package.json` or lockfiles, `msp-product-cve-alerts` correlates **production hardware/firmware/OS/software versions** using strict version-range evaluation and CPE 2.3 matching.

***

### Why MSPs & IT Teams Use This Actor

- **Zero Browser, Ultra-Lightweight (256 MB RAM)**: Pure async HTTP/2 REST queries (`httpx`) with rolling-window NIST NVD pacing (`per_page=1000`) — no proxies, no Playwright, delivering 100+ verified alerts in ~6–10 seconds.
- **5 Authoritative Open Sources Merged & Deduplicated**:
  1. **NIST NVD API v2** — CPE 2.3 `virtualMatchString` & keyword fallback for firewalls, NAS, VPNs, hypervisors, OS, and enterprise apps.
  2. **OSV.dev** (`/v1/querybatch` + `/v1/vulns/{id}`) — fast batch lookup for Linux distros (`Debian:12`, `Ubuntu`, `Alpine`, `Rocky Linux`) and package ecosystems (`npm`, `PyPI`, `Go`, `Packagist`, `Maven`, `NuGet`, `crates.io`).
  3. **GitHub Advisory Database** (`/advisories`) — reviewed GHSAs and patched version info.
  4. **CISA KEV** (`known_exploited_vulnerabilities.json`) — automatically enriches every matched CVE with `isActivelyExploited`, ransomware campaign flag, and CISA BOD remediation due dates.
  5. **FIRST.org EPSS API** (`/data/v1/epss`) — batch-enriches **93–100%** of matched CVEs with live exploitation probability (`epssScore`) and percentile (`epssPercentile`).
- **Strict Version-Range Correlation (No Coarse False Positives)**:
  - Evaluates NVD `cpeMatch` bounds (`versionStartIncluding`, `versionStartExcluding`, `versionEndIncluding`, `versionEndExcluding`), OSV `introduced`/`fixed`/`last_affected` ranges, and GitHub `vulnerable_version_range` clauses using `packaging.version.Version` plus a deterministic vendor/Debian build comparator (`7.2-64570`, `7.0.1-5050`, `3.0.11-1~deb12u2`, `7.0U3o`).
- **MSP Triage Priority & NIS2 / CRA SLA**:
  - Automatically classifies alerts into `critical_kev` (24–48h SLA), `critical` (72h), `high` (7 days), `medium` (30 days), and `low`, factoring in active CISA KEV exploitation and `internetExposed`.
- **Delta Cron Mode (`onlyNew`) for Slack / Teams / Make / n8n**:
  - Persists `(clientName, assetTag, vulnId)` keys in Apify Key-Value Store (`seen_alerts`), including on graceful `ABORTING` signals. Schedule a daily Apify cron and forward only newly published CVEs to your PSA, Slack, Microsoft Teams, Make, or n8n webhook.

***

### Input Configuration

```json
{
  "assets": [
    {
      "clientName": "Acme Logistics",
      "assetTag": "FW-PAR-01",
      "vendor": "fortinet",
      "product": "fortios",
      "version": "7.2.4",
      "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
      "internetExposed": true
    },
    {
      "clientName": "Cabinet Dupont",
      "assetTag": "NAS-LYO-01",
      "vendor": "synology",
      "product": "diskstation_manager",
      "version": "7.2-64570",
      "internetExposed": false
    },
    {
      "clientName": "FinTech Portal",
      "assetTag": "APP-NODE-01",
      "vendor": "lodash",
      "product": "lodash",
      "version": "4.17.20",
      "ecosystem": "npm",
      "internetExposed": true
    }
  ],
  "sources": ["nvd", "osv", "github"],
  "enrichWithKev": true,
  "minSeverity": "medium",
  "onlyKev": false,
  "onlyNew": true,
  "maxAlertsPerAsset": 25,
  "maxItems": 100
}
```

#### Built-in MSP Presets

Leave `assets` empty and select from built-in presets (or run with empty `{}` input for the default MSP demo fleet):

- `fortinet_fortios` (Fortinet FortiOS 7.2.4)
- `synology_dsm` (Synology DSM 7.2-64570)
- `sonicwall_sonicos` (SonicWall SonicOS 7.0.1-5050)
- `vmware_esxi` (VMware ESXi 7.0)
- `microsoft_exchange` (Microsoft Exchange Server 2019)
- `veeam_backup` (Veeam Backup & Replication 12.0.0.1420)
- `wordpress_core` (WordPress Core 6.4.1)
- `debian_openssl` (Debian 12 OpenSSL `3.0.11-1~deb12u2`)
- `npm_lodash` (npm `lodash` `4.17.20`)

#### Optional API Keys (Higher Rate Limits for Large MSP Fleets)

- `nvdApiKey`: Raises NIST NVD API v2 rate limit from **5 requests / 30s** to **50 requests / 30s**.
- `githubToken`: Raises GitHub Advisory REST API rate limit from **60 req/hr** to **5,000 req/hr**.

***

### Output Dataset Example

Each pushed item represents a deduplicated, version-verified alert for a specific client asset:

```json
{
  "alertKey": "acme logistics::fw-par-01::CVE-2024-21762",
  "clientName": "Acme Logistics",
  "assetTag": "FW-PAR-01",
  "vendor": "fortinet",
  "product": "fortios",
  "version": "7.2.4",
  "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
  "ecosystem": null,
  "internetExposed": true,
  "vulnId": "CVE-2024-21762",
  "aliases": [],
  "sources": ["nvd"],
  "mspPriority": "critical_kev",
  "severity": "critical",
  "cvssScore": 9.8,
  "cvssVersion": "3.1",
  "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
  "epssScore": 0.9718,
  "epssPercentile": 0.9994,
  "isActivelyExploited": true,
  "kevDateAdded": "2024-02-09",
  "kevDueDate": "2024-02-16",
  "kevRequiredAction": "Apply mitigations per vendor instructions...",
  "kevKnownRansomware": "Unknown",
  "fixedVersions": ["7.2.7"],
  "cwes": ["CWE-787"],
  "title": "Fortinet FortiOS Out-of-Bound Write Vulnerability",
  "summary": "...",
  "slaRecommendation": "Immediate (24-48h) - CISA KEV active exploitation",
  "nis2CraNote": "NIS2 Art. 21 / CRA Art. 14: Actively exploited vulnerability in CISA KEV; requires urgent patching and incident-readiness verification.",
  "publishedAt": "2024-02-09T09:15:08.087",
  "modifiedAt": "2026-10-22T19:20:41.990",
  "references": ["https://fortiguard.com/psirt/FG-IR-24-015"],
  "matchReason": "NVD CPE range (>=7.2.0, <7.2.7) matched 7.2.4",
  "checkedAt": "2026-11-13T05:10:00Z"
}
```

A run summary is also written to the Key-Value Store under key `OUTPUT` (`assetsChecked`, `alertsDelivered`, `skippedByDelta`, `activelyExploitedKevCount`, `byMspPriority`).

***

### Pay-Per-Event (PPE) Billing Guardrails

Supports Apify Pay-Per-Event pricing with strict `maxTotalChargeUsd` enforcement before pushing batches:

- `cve-alert` — charged per matched vulnerability alert pushed to the dataset.
- `asset-checked` — optional per-asset check event when configured in the Actor pricing table.

***

### Local Development & Tests

```bash
python -m venv .venv
.venv/Scripts/activate  # or source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
pytest
```

# Actor input Schema

## `assets` (type: `array`):

List of client appliances, OS, hypervisors, or software packages to monitor. Each entry supports: clientName, vendor, product, version, cpe (optional CPE 2.3), ecosystem (optional OSV/GitHub ecosystem such as npm, PyPI, Debian:12, Packagist), assetTag, internetExposed. Leave empty to run the selected MSP presets.

## `presets` (type: `array`):

Built-in MSP product presets appended when selected (or used automatically when 'assets' is empty). Ideal for quick testing or baseline fleet monitoring.

## `sources` (type: `array`):

Official open vulnerability APIs to query and merge.

## `enrichWithKev` (type: `boolean`):

Cross-check matched CVEs against the live CISA KEV JSON catalog to populate 'isActivelyExploited', ransomware flags, and BOD remediation due dates.

## `minSeverity` (type: `string`):

Filter alerts by minimum CVSS/advisory severity level.

## `onlyKev` (type: `boolean`):

Emit only vulnerabilities present in the CISA Known Exploited Vulnerabilities catalog.

## `publishedWithinDays` (type: `integer`):

Optional age filter in days (e.g. 30 for recent CVEs). Set to 0 to evaluate all vulnerabilities affecting the deployed version.

## `onlyNew` (type: `boolean`):

Persist seen (client, asset, CVE) keys in Apify Key-Value Store ('seen_alerts') and emit only newly discovered vulnerabilities on subsequent scheduled cron runs. State is saved on completion and graceful abort.

## `nvdApiKey` (type: `string`):

Optional NIST NVD API key. Raises NVD rate limit from 5 requests/30s to 50 requests/30s for large MSP asset fleets.

## `githubToken` (type: `string`):

Optional GitHub token (no scopes needed for public advisories). Raises GitHub Advisory API limit from 60 req/hr to 5,000 req/hr.

## `maxAlertsPerAsset` (type: `integer`):

Cap the number of highest-priority alerts emitted per individual asset.

## `maxItems` (type: `integer`):

Maximum total CVE/GHSA alerts pushed to the dataset across all assets.

## Actor input object example

```json
{
  "assets": [
    {
      "clientName": "Acme Logistics",
      "assetTag": "FW-PAR-01",
      "vendor": "fortinet",
      "product": "fortios",
      "version": "7.2.4",
      "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
      "internetExposed": true
    },
    {
      "clientName": "Cabinet Dupont",
      "assetTag": "NAS-LYO-01",
      "vendor": "synology",
      "product": "diskstation_manager",
      "version": "7.2-64570",
      "internetExposed": false
    },
    {
      "clientName": "FinTech Portal",
      "assetTag": "WEB-LODASH",
      "vendor": "lodash",
      "product": "lodash",
      "version": "4.17.20",
      "ecosystem": "npm",
      "internetExposed": true
    }
  ],
  "presets": [],
  "sources": [
    "nvd",
    "osv",
    "github"
  ],
  "enrichWithKev": true,
  "minSeverity": "medium",
  "onlyKev": false,
  "publishedWithinDays": 0,
  "onlyNew": false,
  "maxAlertsPerAsset": 25,
  "maxItems": 100
}
```

# Actor output Schema

## `alerts` (type: `string`):

Deduplicated CVE/GHSA alerts matched against exact deployed versions, enriched with CISA KEV active exploitation status, MSP priority (critical_kev -> low), fixed versions, and NIS2/CRA SLA guidance. Append ?format=csv or ?format=json for PSA/Slack/n8n/Make ingestion.

## `summary` (type: `string`):

Aggregated fleet scan metrics by MSP priority, client, and source.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "assets": [
        {
            "clientName": "Acme Logistics",
            "assetTag": "FW-PAR-01",
            "vendor": "fortinet",
            "product": "fortios",
            "version": "7.2.4",
            "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
            "internetExposed": true
        },
        {
            "clientName": "Cabinet Dupont",
            "assetTag": "NAS-LYO-01",
            "vendor": "synology",
            "product": "diskstation_manager",
            "version": "7.2-64570",
            "internetExposed": false
        },
        {
            "clientName": "FinTech Portal",
            "assetTag": "WEB-LODASH",
            "vendor": "lodash",
            "product": "lodash",
            "version": "4.17.20",
            "ecosystem": "npm",
            "internetExposed": true
        }
    ],
    "presets": [],
    "sources": [
        "nvd",
        "osv",
        "github"
    ],
    "enrichWithKev": true,
    "minSeverity": "medium",
    "onlyKev": false,
    "publishedWithinDays": 0,
    "onlyNew": false,
    "maxAlertsPerAsset": 25,
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("vesper_studio/msp-product-cve-alerts").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "assets": [
        {
            "clientName": "Acme Logistics",
            "assetTag": "FW-PAR-01",
            "vendor": "fortinet",
            "product": "fortios",
            "version": "7.2.4",
            "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
            "internetExposed": True,
        },
        {
            "clientName": "Cabinet Dupont",
            "assetTag": "NAS-LYO-01",
            "vendor": "synology",
            "product": "diskstation_manager",
            "version": "7.2-64570",
            "internetExposed": False,
        },
        {
            "clientName": "FinTech Portal",
            "assetTag": "WEB-LODASH",
            "vendor": "lodash",
            "product": "lodash",
            "version": "4.17.20",
            "ecosystem": "npm",
            "internetExposed": True,
        },
    ],
    "presets": [],
    "sources": [
        "nvd",
        "osv",
        "github",
    ],
    "enrichWithKev": True,
    "minSeverity": "medium",
    "onlyKev": False,
    "publishedWithinDays": 0,
    "onlyNew": False,
    "maxAlertsPerAsset": 25,
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("vesper_studio/msp-product-cve-alerts").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "assets": [
    {
      "clientName": "Acme Logistics",
      "assetTag": "FW-PAR-01",
      "vendor": "fortinet",
      "product": "fortios",
      "version": "7.2.4",
      "cpe": "cpe:2.3:o:fortinet:fortios:7.2.4:*:*:*:*:*:*:*",
      "internetExposed": true
    },
    {
      "clientName": "Cabinet Dupont",
      "assetTag": "NAS-LYO-01",
      "vendor": "synology",
      "product": "diskstation_manager",
      "version": "7.2-64570",
      "internetExposed": false
    },
    {
      "clientName": "FinTech Portal",
      "assetTag": "WEB-LODASH",
      "vendor": "lodash",
      "product": "lodash",
      "version": "4.17.20",
      "ecosystem": "npm",
      "internetExposed": true
    }
  ],
  "presets": [],
  "sources": [
    "nvd",
    "osv",
    "github"
  ],
  "enrichWithKev": true,
  "minSeverity": "medium",
  "onlyKev": false,
  "publishedWithinDays": 0,
  "onlyNew": false,
  "maxAlertsPerAsset": 25,
  "maxItems": 100
}' |
apify call vesper_studio/msp-product-cve-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vesper_studio/msp-product-cve-alerts"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/EoTJvOj43niLItYOV/builds/vaBKheJER5kUTY4VF/openapi.json
