{"uid":"cap_JmAzhwVfiZq1aFG0pI7Ou","slug":"osv-package-vulnerability-check-3fdbb7eb","name":"OSV Package Vulnerability Check","description":"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.","url":"https://agent-utils-x402-production.revenue-agent-jw.workers.dev/v1/osv/package?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}},"responseSchema":{"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}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GCr6TcAjaG-xk4pxNrrQu","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Pre-install dependency safety check","prompt":"I'm about to add requests version 2.26.0 to my Python project — can you check if it has any known vulnerabilities and what the safest version to use is?"},{"title":"CI pipeline vulnerability gate","prompt":"Scan these three packages for me before we merge: pkg:npm/axios@0.21.1, pkg:pypi/pillow@8.2.0, and pkg:golang/github.com/gin-gonic/gin@1.7.2 — flag anything with HIGH or CRITICAL severity."},{"title":"Upgrade path for known CVE","prompt":"We got flagged for CVE-2021-23337 in our codebase — it's in lodash 4.17.20 on npm. What's the verified clean version we should upgrade to?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T01:07:46.625Z","isFirstParty":false,"canonicalSlug":"osv-package-vulnerability-check-3fdbb7eb"}