# OSV Package Vulnerability Check

> OSV Package Vulnerability Check is a paid API for AI agents from agent-utils-x402-production.revenue-agent-jw.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-18).

Checks open-source packages for known vulnerabilities via OSV.dev across npm, PyPI, Go, crates.io, Maven, RubyGems, NuGet, Packagist, and more, returning CVE/GHSA details, CVSS scores, and safe upgrade versions.

## Facts

- Endpoint: GET https://agent-utils-x402-production.revenue-agent-jw.workers.dev/v1/osv/package?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/osv-package-vulnerability-check-3fdbb7eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JmAzhwVfiZq1aFG0pI7Ou

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability osv-package-vulnerability-check-3fdbb7eb
```

Example prompt: Before I install lodash version 4.17.20 from npm, check if it has any known vulnerabilities and tell me what version I should upgrade to if it's unsafe.

## When to prefer this

Use this endpoint when you need real-time, authoritative vulnerability data from OSV.dev across any major package ecosystem before installing or upgrading a dependency. It's ideal for agents doing pre-install checks, CI security gates, or auditing existing dependencies. Prefer this over static SCA tools when you need live data with verified upgrade paths and structured CVSS severity scores. Supports both single-package lookups (by ecosystem+name+version or purl) and small batch checks (up to 10 purls).

## Known failure modes

- 400 Bad Request: invalid or missing input (e.g. unrecognized ecosystem, malformed purl, missing required fields)
- 502 Bad Gateway: OSV.dev upstream is unavailable or timed out
- Empty vulnerabilities list: package+version combination has no known advisories (not necessarily an error)
- Batch limit exceeded: more than 10 purls provided in the packages parameter

## How this service works

Open-source package vulnerability check via OSV.dev for npm, PyPI, Go, crates.io, Maven, RubyGems, NuGet, Packagist and more, by ecosystem+name+version, purl, or up to 10 purls. Useful before installing or upgrading a dependency. Returns vulnerable flag, count, CVE/GHSA aliases, CVSS score and severity, fixed versions and a verified upgradeTo version. Errors: 400 invalid input, 502 OSV unavailable.

## Output

Returns a JSON object with: a 'vulnerable' boolean, total vulnerability count, a list of individual vulnerabilities each with GHSA/CVE IDs, CVSS score and severity level, and fixed versions. Also includes a top-level 'upgradeTo' field pointing to the latest verified-clean version, and an 'upgrade' object with version and verifiedClean flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string",
       "description": "package name; Maven uses groupId:artifactId, Go uses the module path"
      },
      "purl": {
       "type": "string",
       "description": "alternative to ecosystem+name+version, e.g. pkg:npm/lodash@4.17.20"
      },
      "limit": {
       "type": "integer",
       "maximum": 200,
       "minimum": 1,
       "description": "max vulns returned per package, default 50"
      },
      "version": {
       "type": "string",
       "description": "optional exact version; omit for all known advisories"
      },
      "packages": {
       "type": "string",
       "description": "batch: up to 10 comma-separated purls"
      },
      "ecosystem": {
       "type": "string",
       "description": "OSV ecosystem, case-insensitive: npm, PyPI, Go, crates.io, Maven, RubyGems, NuGet, Packagist, Hex, Pub, Debian:12 ..."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 4,
  "query": {
   "name": "lodash",
   "version": "4.17.20",
   "ecosystem": "npm"
  },
  "vulns": [
   {
    "id": "GHSA-35jh-r3h4-6jhm",
    "cve": [
     "CVE-2021-23337"
    ],
    "severity": {
     "level": "HIGH",
     "score": 7.2
    },
    "upgradeTo": "4.17.21"
   }
  ],
  "upgrade": {
   "version": "4.18.1",
   "verifiedClean": true
  },
  "upgradeTo": "4.18.1",
  "vulnerable": true,
  "maxSeverity": "HIGH",
  "uniqueCount": 4
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/osv-package-vulnerability-check-3fdbb7eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-utils-x402-production.revenue-agent-jw.workers.dev](https://www.zero.xyz/host/agent-utils-x402-production.revenue-agent-jw.workers.dev/llms.txt)
