Query open source package vulnerabilities by ecosystem and version via the OSV.dev REST API

domain: google.github.io/osv.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. No API key is required; OSV.dev's REST API is publicly accessible with no authentication for standard queries.
  2. Query vulnerabilities for a specific package version with POST https://api.osv.dev/v1/query and a JSON body containing the package name, ecosystem (e.g., PyPI, npm, Go, Maven), and version.
  3. Retrieve full vulnerability details for a specific OSV ID with GET https://api.osv.dev/v1/vulns/{osv_id}, which returns the full Vulnerability object including affected ranges and aliases.
  4. Perform batch queries for multiple packages in a single request with POST https://api.osv.dev/v1/querybatch supplying an array of query objects; results return vulnerability IDs and the modified timestamp.
  5. Parse the aliases field in each vulnerability to map OSV IDs to CVE, GHSA, or other advisory identifiers for cross-reference with your existing tooling.
  6. Integrate OSV queries into CI by calling the API for each dependency listed in your lockfile and failing the build if any result returns a non-empty vulns array.

Known gotchas

Related routes

Query the OSV API to look up vulnerability advisories for a specific package version
osv.dev · 5 steps · unrated
Batch-check multiple package versions for known vulnerabilities using the OSV.dev querybatch API
osv.dev · 5 steps · unrated
Query the OSV database and run OSV-Scanner across a repository to identify known vulnerabilities
osv.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans