# CVE Vulnerability Lookup — NVD Search & AI Triage (`noniner/cve-vulnerability-lookup`) Actor

Search known vulnerabilities (CVEs) for any product, library or keyword from the official NVD database — with CVSS severity, affected versions and an AI triage of what matters most. For security teams, dependency audits and due diligence.

- **URL**: https://apify.com/noniner/cve-vulnerability-lookup.md
- **Developed by:** [Fredrik Hansson](https://apify.com/noniner) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$150.00 / 1,000 query analyzeds

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

## CVE Vulnerability Lookup — NVD Search & AI Triage

**Turn any product, library or keyword into a prioritised vulnerability report.** Give this Actor a name like `log4j`, `openssl` or a specific id like `CVE-2021-44228`, and it searches the **official NVD (National Vulnerability Database)** for every known CVE — then hands back each one with its **CVSS score and severity**, affected products, CWE weaknesses and references, plus an **AI triage** that tells you which vulnerabilities actually matter.

You bring the product name. It hands back a ranked risk brief.

***

### The flow

```
1. Give a product / library / CVE     2. Search the official NVD API      3. Get a triaged risk brief
   (e.g. "log4j", "openssl",     →        (CVSS, CWE, affected,       →      CVE rows + AI triage:
    "CVE-2021-44228")                       references)                       top priority · themes · risk
```

1. **Add your queries** — product names, library names, keywords, or exact CVE ids. One per line.
2. **The Actor searches NVD 2.0** (`keywordSearch`, or `cveId` when the query is a CVE id), pulling CVSS v3.1/v3.0/v2 scores, CWE weaknesses, affected CPEs and references.
3. **The AI layer triages each query's CVE set** — what to fix first, common weakness patterns, an overall risk level, and concrete recommended actions.

***

### What you get per query

For every query, the Actor:

1. **Searches the NVD database** — the official U.S. government source of record for CVEs. CVE ids are detected automatically (`/^CVE-\d{4}-\d+$/`) and looked up by id; everything else is a keyword search.
2. **Returns one record per CVE** — `cveId`, `published`, `cvssScore`, `cvssSeverity`, `cvssVersion` (prefers 3.1, falls back to 3.0 then 2.0), English `description`, `cwe` (weakness ids), `affectedProducts` (best-effort from CPE configurations) and the top `references`.
3. **Filters by severity** — set `minCvssScore` to drop everything below your floor (e.g. only `7.0+` high/critical).
4. **Scopes by date** — set `publishedAfter` to only see recent CVEs.

Then the **AI layer** (OpenAI `gpt-4o-mini`, a fast and low-cost model) adds **one triage record per query**:

- **`overallRisk`** — `low` / `medium` / `high` / `critical`, reflecting the most severe exploitable issues present.
- **`topPriority`** — the CVEs that matter most, each with `whyItMatters`.
- **`themes`** — common weakness patterns across the set (e.g. deserialization, path traversal).
- **`summary`** — a two-sentence read on the risk.
- **`recommendedActions`** — concrete next steps. Everything is grounded strictly in the CVE data — no invented CVE ids or scores.

***

### Three ways people use it

- **Dependency & supply-chain security audits** — point a `CVE search` at every library in your stack (`log4j`, `openssl`, `lodash`, `spring`) and get a triaged list of known vulnerabilities with CVSS scores — a lightweight `vulnerability scanner` for your dependency tree and software bill of materials (SBOM), straight off the `NVD API`.
- **Vendor / vulnerability due diligence** — before adopting a tool or acquiring a company, search its products for a `CVSS`-ranked history of CVEs and let the AI triage flag the `supply chain security` red flags that matter.
- **Threat monitoring** — track a technology by keyword with `publishedAfter` to surface newly published CVEs, with an AI read on severity and recommended actions.

Keywords this Actor serves: CVE search, NVD API, vulnerability scanner, CVSS, supply chain security, CWE, security due diligence, dependency audit.

> **Rate limits:** The free NVD API allows roughly **5 requests per 30 seconds** without a key, so the Actor paces its requests and keeps concurrency low. Need more throughput? Set an optional **`NVD_API_KEY`** environment variable (a [free NVD key](https://nvd.nist.gov/developers/request-an-api-key)) and the Actor sends it as the `apiKey` header. It works fine **without** a key.

***

### Input

| Field | Type | Notes |
|---|---|---|
| `queries` | array | **Required.** Products, libraries, keywords, or CVE ids (e.g. `log4j`, `openssl`, `CVE-2021-44228`). One per line. |
| `maxCvesPerQuery` | integer | Max CVEs to fetch from NVD per query. Default `20` (max 2000). |
| `minCvssScore` | number | Only keep CVEs with a CVSS base score ≥ this floor (0–10). Default `0`. |
| `publishedAfter` | string | Optional ISO date (e.g. `2023-01-01`) — only CVEs published on/after it. |
| `maxResults` | integer | Global cap on total CVE records across all queries. Default `100`. |
| `maxConcurrency` | integer | Queries run in parallel. Default `2` — NVD rate-limits hard. |
| `model` | string | Override the OpenAI model. Default `gpt-4o-mini`. |

#### Minimal input example

```json
{
  "queries": ["log4j", "openssl"],
  "maxCvesPerQuery": 20,
  "minCvssScore": 7.0
}
```

***

### Output example

A **CVE row**:

```json
{
  "recordType": "cve",
  "query": "log4j",
  "cveId": "CVE-2021-44228",
  "published": "2021-12-10T10:15:09.143",
  "cvssScore": 10.0,
  "cvssSeverity": "CRITICAL",
  "cvssVersion": "3.1",
  "description": "Apache Log4j2 2.0-beta9 through 2.15.0 ... JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints...",
  "cwe": ["CWE-502", "CWE-917"],
  "affectedProducts": ["apache log4j", "oracle retail xstore point of service"],
  "references": [
    "https://logging.apache.org/log4j/2.x/security.html",
    "https://www.cisa.gov/uscert/ncas/current-activity/2021/12/10/apache-log4j-vulnerability-guidance"
  ]
}
```

A **triage row** (one per query):

```json
{
  "recordType": "triage",
  "query": "log4j",
  "cveCount": 20,
  "overallRisk": "critical",
  "topPriority": [
    { "cveId": "CVE-2021-44228", "whyItMatters": "Unauthenticated remote code execution (Log4Shell), CVSS 10.0, trivially exploitable and widely weaponised." }
  ],
  "themes": ["Unsafe deserialization / JNDI lookups", "Denial of service via recursive lookups"],
  "summary": "The Log4j CVE set is dominated by the critical Log4Shell RCE and its follow-on patches. Any service embedding a pre-2.17 Log4j 2.x build is at severe, actively-exploited risk.",
  "recommendedActions": [
    "Upgrade Log4j to 2.17.1 or later across all services.",
    "Scan deployed artifacts and containers for vulnerable log4j-core jars."
  ]
}
```

***

### Pay-per-event pricing

This Actor uses **pay-per-event** billing with one event:

| Event | Price | Charged when |
|---|---|---|
| `query-analyzed` | **$0.15** | Once per product/keyword searched against the NVD database and triaged with AI. |

The Actor logs its OpenAI token usage and the estimated AI cost per query at the end of every run, so the event price always stays safely above the model cost.

***

### Data source

All vulnerability data comes from the **official [NVD — National Vulnerability Database](https://nvd.nist.gov/)** (NIST), via the public [NVD API 2.0](https://nvd.nist.gov/developers/vulnerabilities). NVD data is **free and public**; this Actor adds rate-limit-safe fetching, a clean flat schema and an AI triage layer on top.

***

### Setup

The AI triage calls the OpenAI API. Set the environment variable / secret **`OPENAI_API_KEY`** on the Actor.

Optionally set **`NVD_API_KEY`** (a free key from NVD) to raise the rate limit — not required.

***

### Use it from an AI agent (Apify MCP server)

This Actor is available through the [Apify MCP server](https://mcp.apify.com), so AI agents (Claude, ChatGPT, or anything that speaks MCP) can call it as a tool — hand it a list of products or CVE ids, and read back the triaged vulnerabilities — with no custom integration code.

***

### Run it locally

```bash
npm install
## put your input in storage/key_value_stores/default/INPUT.json
export OPENAI_API_KEY=sk-...   # required for the AI triage
## export NVD_API_KEY=...       # optional, higher rate limit
apify run -p
```

***

### Related actors

- [npm Package Intelligence](https://apify.com/fuze/npm-package-intelligence) — Analyze any npm package — health, maintenance, dependencies and risk signals.
- [PyPI Package Intelligence](https://apify.com/fuze/pypi-package-intelligence) — The same for Python packages on PyPI — metadata, releases and risk.
- [GitHub Repo Analyzer](https://apify.com/fuze/github-repo-analyzer) — Profile any GitHub repository — activity, maintainers and project health.
- [B2B Tech Stack Detector](https://apify.com/fuze/b2b-tech-stack-detector) — Detect the technologies a company's website runs on, for sales and research.

# Actor input Schema

## `queries` (type: `array`):

Products, libraries or keywords to search (e.g. "log4j", "openssl"), or a specific CVE id (e.g. "CVE-2021-44228"). One per line.

## `maxCvesPerQuery` (type: `integer`):

Maximum number of CVEs to fetch from NVD for each query.

## `minCvssScore` (type: `number`):

Only keep CVEs with a CVSS base score at or above this floor (0-10). 0 keeps everything.

## `publishedAfter` (type: `string`):

Only return CVEs published on or after this ISO date (e.g. 2023-01-01). Max 120-day window from now.

## `maxResults` (type: `integer`):

Global cap on total CVE records pushed across all queries.

## `maxConcurrency` (type: `integer`):

How many queries to run in parallel. Keep this low — NVD rate-limits hard without an API key.

## `model` (type: `string`):

Override the model (default gpt-4o-mini).

## Actor input object example

```json
{
  "queries": [
    "log4j",
    "openssl"
  ],
  "maxCvesPerQuery": 20,
  "minCvssScore": 0,
  "maxResults": 100,
  "maxConcurrency": 2
}
```

# Actor output Schema

## `cves` (type: `string`):

All CVE records and triage summaries in the default dataset.

# 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 = {
    "queries": [
        "log4j",
        "openssl"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("noniner/cve-vulnerability-lookup").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 = { "queries": [
        "log4j",
        "openssl",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("noniner/cve-vulnerability-lookup").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 '{
  "queries": [
    "log4j",
    "openssl"
  ]
}' |
apify call noniner/cve-vulnerability-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,noniner/cve-vulnerability-lookup"
        }
    }
}
```

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/fbWHZoWPq9ITp82xU/builds/ZND6TkpNzQz2gY0lP/openapi.json
