# Package Vulnerability Check API: npm, PyPI, CVE, safe upgrade (`bosco_labs/package-vulns`) Actor

Is an npm, PyPI, Maven, Go, crates.io, NuGet, RubyGems or Packagist package version vulnerable? Known CVE/GHSA vulnerabilities with severity, CVSS, fixed versions, CISA KEV exploited status and the lowest safe upgrade; or one CVE id in. From the OSV.dev vulnerability database and CISA, sourced.

- **URL**: https://apify.com/bosco_labs/package-vulns.md
- **Developed by:** [Bosco Labs](https://apify.com/bosco_labs) (community)
- **Categories:** Developer tools, AI, Automation
- **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 package checks

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

## Package Vulnerability Check API: CVEs, CISA KEV, safe upgrade

**Is this package version vulnerable, is any of it exploited in the wild, and which version is safe to upgrade to?**
One call answers it for npm, PyPI, Maven, Go, crates.io, NuGet, RubyGems and Packagist packages, or for one CVE/GHSA id, from OSV.dev and the CISA KEV catalog (a CVE lookup also shows NVD's record). Built for **coding agents** and for developers who want a sourced answer instead of a scanner setup.

**Pricing (pay per event):** $0.005 per answer (`package-check`, $5 per 1,000). A clean "no known vulnerabilities" is a real answer and is charged once the package is confirmed to exist; bad input, a misspelled or unreleased package, an unknown id or a dead source fails in seconds and costs nothing.

### What you get

One JSON item per question. Real output for `{"ecosystem": "npm", "name": "lodash", "version": "4.17.15"}` (6 Nov 2026; the 2 most severe of the 5 vulnerabilities shown):

```json
{
  "schema_version": "1",
  "query_type": "package",
  "ecosystem": "npm",
  "name": "lodash",
  "version": "4.17.15",
  "vulnerability_id": null,
  "summary": "npm lodash 4.17.15: 5 known vulnerabilities (max severity HIGH), none in CISA KEV; safe version: 4.18.1.",
  "vulnerability_count": 5,
  "known_exploited": false,
  "max_severity": "HIGH",
  "safe_version": "4.18.1",
  "safe_version_note": "4.18.1 is the lowest version above 4.17.15 among the advisories' fixed versions with no known vulnerability in OSV.dev (checked with OSV, not a release-list scan).",
  "epss": null,
  "nvd": null,
  "vulnerabilities": [
    {
      "id": "GHSA-r5fr-rjxr-66jc",
      "aliases": ["CVE-2026-4800"],
      "summary": "lodash vulnerable to Code Injection via `_.template` imports key names",
      "severity": "HIGH",
      "cvss_score": 8.1,
      "cvss_vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "published": "2026-04-01T23:51:12Z",
      "modified": "2026-10-17T02:56:15.633068434Z",
      "fixed_versions": ["4.18.0"],
      "affected_ranges": [
        { "ecosystem": "npm", "name": "lodash", "introduced": "4.0.0", "fixed": "4.18.0", "last_affected": null }
      ],
      "known_exploited": false,
      "kev": null,
      "source_db": "GitHub Advisory Database",
      "license": "CC BY 4.0",
      "source_url": "https://osv.dev/vulnerability/GHSA-r5fr-rjxr-66jc"
    },
    {
      "id": "GHSA-p6mc-m468-83gw",
      "aliases": ["CVE-2020-8203"],
      "summary": "Prototype Pollution in lodash",
      "severity": "HIGH",
      "cvss_score": 7.4,
      "cvss_vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H",
      "published": "2020-07-15T19:15:48Z",
      "modified": "2025-08-12T21:56:17.174859Z",
      "fixed_versions": ["4.17.19"],
      "affected_ranges": [
        { "ecosystem": "npm", "name": "lodash", "introduced": "3.7.0", "fixed": "4.17.19", "last_affected": null }
      ],
      "known_exploited": false,
      "kev": null,
      "source_db": "GitHub Advisory Database",
      "license": "CC BY 4.0",
      "source_url": "https://osv.dev/vulnerability/GHSA-p6mc-m468-83gw"
    }
  ],
  "source_url": "https://osv.dev/list?ecosystem=npm&q=lodash",
  "provided_by": "Bosco Labs (boscolabs.dev)",
  "attribution": "Advisories via OSV.dev from: GitHub Advisory Database (CC BY 4.0). Reformatted by Bosco Labs; cvss_score is computed by Bosco Labs from the advisory's CVSS v3 vector. Known-exploited status: CISA Known Exploited Vulnerabilities catalog (CC0 1.0); no endorsement by CISA or DHS.",
  "warnings": [],
  "checked_at": "2026-11-06T08:59:29+00:00",
  "duration_seconds": 1.2
}
```

So: 4.17.15 has five known advisories, none known to be exploited; 4.17.21 (the usual answer) still has two, and 4.18.1 is the first fixed version with none.

A CVE, `{"vulnerabilityId": "CVE-2021-44228"}` (real output, shortened):

```json
{
  "query_type": "vulnerability",
  "vulnerability_id": "CVE-2021-44228",
  "summary": "CVE-2021-44228 (GHSA-jfh8-c2jp-5v3q): CRITICAL, in CISA KEV since 2021-12-10; affects 3 package(s): Maven com.guicedee.services:log4j-core, Maven org.apache.logging.log4j:log4j-core, Maven org.ops4j.pax.logging:pax-logging-log4j2.",
  "known_exploited": true,
  "max_severity": "CRITICAL",
  "epss": { "cve": "CVE-2021-44228", "score": 0.99999, "percentile": 1.0, "date": "2026-11-05" },
  "nvd": { "cve": "CVE-2021-44228", "cvss_score": 10.0, "cvss_severity": "CRITICAL", "cwe_ids": ["CWE-20", "CWE-400", "CWE-502", "CWE-917"], "vuln_status": "Analyzed", "source_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44228" },
  "vulnerabilities": [
    {
      "id": "GHSA-jfh8-c2jp-5v3q",
      "aliases": ["CVE-2021-44228"],
      "summary": "Remote code injection in Log4j",
      "severity": "CRITICAL",
      "affected_ranges": [
        { "ecosystem": "Maven", "name": "org.apache.logging.log4j:log4j-core", "introduced": "2.13.0", "fixed": "2.15.0", "last_affected": null },
        { "ecosystem": "Maven", "name": "org.apache.logging.log4j:log4j-core", "introduced": "2.0-beta9", "fixed": "2.3.1", "last_affected": null },
        { "ecosystem": "Maven", "name": "org.apache.logging.log4j:log4j-core", "introduced": "2.4", "fixed": "2.12.2", "last_affected": null }
      ],
      "known_exploited": true,
      "kev": { "cve": "CVE-2021-44228", "date_added": "2021-12-10", "due_date": "2021-12-24", "known_ransomware_campaign_use": "Known", "vulnerability_name": "Apache Log4j2 Remote Code Execution Vulnerability", "catalog_version": "2026.11.04" },
      "source_url": "https://osv.dev/vulnerability/GHSA-jfh8-c2jp-5v3q"
    }
  ],
  "source_url": "https://osv.dev/vulnerability/CVE-2021-44228"
}
```

- **vulnerabilities**: one item per distinct vulnerability, most severe first (known exploited, then severity, then CVSS), at most 40; `vulnerability_count` is always the full number. The same bug listed by GitHub and the PyPA database is merged into one item (the GHSA leads, the PYSEC id goes into `aliases`).
- **known_exploited / kev**: whether the CVE is in CISA's Known Exploited Vulnerabilities catalog, with the date added and whether ransomware campaigns use it.
- **safe_version** (only when you give a `version`): the lowest fixed version above yours that OSV.dev itself reports as clean. Every candidate is re-checked with OSV, so a "fixed" version that is hit by a later advisory is skipped (as with lodash 4.17.21 above).
- **nvd / epss** (CVE/GHSA mode): NVD's CVSS, CWE and analysis status, and FIRST's EPSS score (probability of exploitation activity in the next 30 days) as context.
- **source_url** per advisory, **attribution** per row, **warnings** when an optional source was down.

### Input

```json
{ "ecosystem": "PyPI", "name": "requests", "version": "2.32.5" }
```

| Field | Meaning |
|---|---|
| `ecosystem` | `npm`, `PyPI`, `Maven`, `Go`, `crates.io`, `NuGet`, `RubyGems` or `Packagist` (also `pip`, `cargo`, `rust`, `golang`, `composer`, `gem`) |
| `name` | Package name as in the registry; Maven = `group:artifact`, Go = module path |
| `version` | Optional exact version. Empty = every advisory at any version (the 40 most severe listed, no `safe_version`) |
| `vulnerabilityId` | Instead of a package: `CVE-...`, `GHSA-...` (also `PYSEC-`, `GO-`, `RUSTSEC-`, `MAL-`) |

Typical questions and the input that answers them:

| Question | Input |
|---|---|
| Is requests 2.32.5 safe? | `{"ecosystem": "PyPI", "name": "requests", "version": "2.32.5"}` (1 MODERATE, safe version 2.33.0) |
| Which log4j versions does Log4Shell hit, and is it exploited? | `{"vulnerabilityId": "CVE-2021-44228"}` |
| Is this GitHub advisory in CISA KEV? | `{"vulnerabilityId": "GHSA-jfh8-c2jp-5v3q"}` |

### Use from an AI agent (MCP)

Agents can call this Actor as a tool through the [Apify MCP server](https://github.com/apify/apify-mcp-server). Add this server URL to your MCP client (Claude, Cursor, VS Code, ...):

```text
https://mcp.apify.com?tools=bosco_labs/package-vulns
```

It loads this Actor as a tool, plus the tools that read its results (`get-actor-run`, `get-dataset-items`). The hosted server signs you in with OAuth, or accepts your Apify token as `Authorization: Bearer <APIFY_TOKEN>`.

Example prompt: *"Before I bump lodash in package.json: is 4.17.15 vulnerable, is anything exploited, and what is the lowest safe version? Cite the advisories."* The agent passes:

```json
{ "ecosystem": "npm", "name": "lodash", "version": "4.17.15" }
```

**Output for agents:** one JSON item (2-15 KB), stable `snake_case` fields, ISO dates, `null` for unknown, a one-sentence `summary`, an OSV link per advisory. Bad input fails at once with a valid example. A package check takes about 1 second; each source has a 15-second limit with two retries.

**Cost:** $0.005 per answer, billed to the Apify account the MCP server is signed in with.

### FAQ

**Where does the data come from?** OSV.dev, Google's open vulnerability database, which collects the GitHub Advisory Database, the PyPA, Go and RustSec databases, OpenSSF malicious-package reports and more. OSV decides whether your exact version is in an affected range (we never re-implement version rules). Exploit status comes from the CISA KEV catalog (downloaded fresh every run); for a CVE/GHSA id we add FIRST's EPSS score and NVD's record.

**Is a clean answer charged?** Yes, once we know the package is real. "No known vulnerabilities in OSV.dev" is the answer you asked for and costs $0.005 like any other. Nothing is charged when the input is invalid, the package or version does not exist, the id is unknown or OSV.dev does not answer.

**Does it check that the package or version exists?** Yes, whenever OSV.dev has no advisory for it: the name (and version) is looked up in the registry index (deps.dev for npm, PyPI, Maven, Go, crates.io, NuGet and RubyGems; Packagist for PHP). Not found = the run fails with "check the spelling" and costs nothing. Releases from the last few hours may not be indexed yet. If the index itself is down, you get the answer with the warning "Existence not verified". When OSV does have advisories, the package is reported even if it was removed from its registry (for example a malicious package).

**How fresh is it?** Live: OSV.dev, KEV, EPSS and NVD are queried on every run. OSV imports new GitHub advisories within minutes to hours; brand-new CVEs can take a day to appear.

**How is `safe_version` chosen, and what are its limits?** We take the fixed versions from the advisories, keep those above your version, and ask OSV which of them have no known vulnerability. If all are hit by other advisories, we follow those advisories' fixed versions (three rounds). It is not a scan of every release: a clean version that no advisory names as "fixed" is not proposed, and it ignores semver majors (check breaking changes yourself). Versions are ordered numerically; pre-release tags are not ranked precisely. Without a `version` there is no `safe_version`: the newest fixed version could be older than what you run.

**Why is `cvss_score` sometimes null?** OSV records carry CVSS vectors, not scores. We compute the CVSS v3 base score from the vector (FIRST's formula); v4-only advisories keep the vector and a null score. In CVE mode, `nvd.cvss_score` is NVD's own score.

**What is not included?** Operating-system packages (Debian, Ubuntu, Alpine, Red Hat), container images and transitive dependencies: pass each package you care about. Advisories from sources whose licence forbids commercial reuse (Chainguard/Wolfi, CC BY-NC-ND) are omitted, with a warning naming them.

**Can I republish the results?** Keep the `attribution` text. Licences, checked first-hand on 6 Nov 2026:

- OSV.dev lists a licence per source ([osv.dev data sources](https://google.github.io/osv.dev/data/)). We use only: GitHub Advisory Database, PyPA, Go and OSS-Fuzz data (CC BY 4.0, which requires credit and noting changes: each item names its `source_db` and `license`), RustSec (CC0 1.0), OpenSSF Malicious Packages (Apache 2.0) and NVD-converted CVE records (NVD is a US government work in the public domain; CVE content is used under MITRE's [CVE Terms of Use](https://www.cve.org/Legal/TermsOfUse), whose copyright line is in `attribution`).
- CISA KEV: "The KEV database is distributed under the Creative Commons 0 1.0 License" ([license.txt](https://www.cisa.gov/sites/default/files/licenses/kev/license.txt)); no CISA endorsement is implied.
- FIRST EPSS: "Attribution is requested when EPSS data is used in publications or products" ([EPSS FAQ](https://www.first.org/epss/faq)); FIRST's [Services Terms](https://www.first.org/about/policies/terms) license distribution for vulnerability disclosure, incident response or preventative cybersecurity uses.
- NVD: This product uses the NVD API but is not endorsed or certified by the NVD ([NVD terms of use](https://nvd.nist.gov/developers/terms-of-use)). NVD descriptions over 1,000 characters are shortened and marked as shortened by Bosco Labs.
- deps.dev (existence check only): its data is "available under a CC-BY 4.0 license" and the API is used under the Google API Terms of Service ([deps.dev](https://github.com/google/deps.dev#data)); only a yes/no is used.

**Personal data?** None. Advisories describe software, not people.

# Actor input Schema

## `ecosystem` (type: `string`):

Package registry of `name`, e.g. "npm". One of npm, PyPI, Maven, Go, crates.io, NuGet, RubyGems, Packagist (also accepted: pip, cargo, rust, golang, composer, gem; any case). Needed with `name`; ignored when `vulnerabilityId` is set. No default.

## `name` (type: `string`):

Package name exactly as in its registry, e.g. "lodash", "requests", "org.apache.logging.log4j:log4j-core" (Maven = group:artifact) or "github.com/gin-gonic/gin" (Go module path). When OSV has no advisory, the name (and version) is checked in the registry index; an unknown package fails free of charge. Ignored when `vulnerabilityId` is set.

## `version` (type: `string`):

Exact version to check, e.g. "4.17.15" (Go: "v1.9.0"). OSV.dev decides whether it falls in an affected range. With a version you also get `safe_version`: the lowest fixed version above it with no known vulnerability. Empty = every advisory for the package at any version (the 40 most severe are listed, no safe_version).

## `vulnerabilityId` (type: `string`):

One vulnerability id instead of a package, e.g. "CVE-2021-44228" or "GHSA-jfh8-c2jp-5v3q" (PYSEC-, GO-, RUSTSEC-, MAL- and OSV- ids work too). Returns the affected packages and version ranges, CISA KEV status, the FIRST EPSS score and NVD's CVSS. When set, the package fields are ignored. Empty = package mode.

## Actor input object example

```json
{
  "ecosystem": "npm",
  "name": "lodash",
  "version": "4.17.15"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "ecosystem": "npm",
    "name": "lodash",
    "version": "4.17.15"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bosco_labs/package-vulns").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 = {
    "ecosystem": "npm",
    "name": "lodash",
    "version": "4.17.15",
}

# Run the Actor and wait for it to finish
run = client.actor("bosco_labs/package-vulns").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 '{
  "ecosystem": "npm",
  "name": "lodash",
  "version": "4.17.15"
}' |
apify call bosco_labs/package-vulns --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bosco_labs/package-vulns"
        }
    }
}
```

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/w9nnYnM3ssceCB9gg/builds/qiv4OLNXgOALCet4A/openapi.json
