NIST National Vulnerability Database (NVD) 2.0 Executor¶
Category: Threat Intelligence
Script: nist_nvd.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://nvd.nist.gov/developers/vulnerabilities
Description¶
Imports CVE records from the NIST NVD 2.0 API into Faraday. You can fetch a list of specific CVEs or every CVE modified in the last N days. Each CVE becomes a vulnerability with its CVSS severity, CWEs and NVD references.
Prerequisites¶
- Network access to
https://services.nvd.nist.gov(or to the mirror set inNVD_HOST) - Optionally, an NVD API key for a higher rate limit
- The Python
requestslibrary installed in the agent environment
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
NVD_API_KEY |
No | NVD API key. Without it, the executor waits 6 seconds between requests to respect the public rate limit; with it, 0.7 seconds. |
NVD_HOST |
No | NVD API base URL, for a mirror or cache (default: https://services.nvd.nist.gov) |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
NVD_CVE_LIST |
string | No | Comma-separated CVE IDs to fetch (e.g., CVE-2024-1234, CVE-2023-5678). Invalid IDs are skipped. When set, NVD_LAST_MOD_DAYS is ignored. |
NVD_LAST_MOD_DAYS |
integer | No | Import every CVE modified in the last N days, 1 to 120 (default: 7). Used only when NVD_CVE_LIST is empty. |
YAML Configuration Example¶
executors:
nist_nvd:
repo_executor: nist_nvd.py
max_size: 65536
varenvs:
NVD_API_KEY: "<nvd_api_key>"
params:
NVD_CVE_LIST:
mandatory: false
type: string
base: string
NVD_LAST_MOD_DAYS:
mandatory: false
type: integer
base: integer
How It Works¶
- Sends the API key, when set, in the
apiKeyheader, and waits between requests to stay under the NVD rate limit - With
NVD_CVE_LIST, calls/rest/json/cves/2.0?cveId=<id>once per CVE. Otherwise, calls/rest/json/cves/2.0with alastModStartDate/lastModEndDatewindow and reads all pages of 2000 results. - Creates one vulnerability per CVE, named
[NVD] <CVE ID>: <first sentence of the description> - Maps severity from the CVSS base severity (v3.1, then v3.0, then v2), or from the base score when the label is missing
- Adds the CWEs, CVSS vector, publication and modification dates, the NVD permalink and all advisory URLs as references
Notes¶
- All vulnerabilities go to a single host with IP
0.0.0.0and hostnamenist-nvd, because NVD records are not tied to hosts. - CVEs that NVD has not scored yet are imported as
info. - Rejected CVEs are imported as
infowith a[REJECTED]prefix in the name. - Values of
NVD_LAST_MOD_DAYSoutside 1–120 are clamped, and invalid values fall back to7. - Failed requests are written to the agent log and skipped; the run does not fail.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.