CVE Matching
List the OSV advisories filed under a package name, alongside the versions nixpkgs carries for it, with a confidence score per advisory.
GET /api/v1/vulns/:packagePath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
package | string | Yes | nixpkgs attribute or package name. Letters, digits, ., _, / and - only; anything else answers 400. Package-set prefixes such as python3Packages are stripped before lookup |
There are no query parameters. A query string is not read: ?version=8.4.0 returns the same body as no query at all. Version comparison uses the nixpkgs-unstable version this endpoint looks up itself, never a version supplied by the caller.
Response
A live response for openssl:
{
"success": true,
"data": {
"package": "openssl",
"normalizedName": "openssl",
"nixpkgsVersions": {
"nixos-25.11": { "version": "4.0.1", "status": "outdated", "vulnerable": false },
"nixos-26.05": { "version": "4.0.3", "status": "newest", "vulnerable": false },
"nixpkgs-unstable": { "version": "4.0.3", "status": "newest", "vulnerable": false }
},
"newestVersion": "4.0.3",
"versionSource": "repology",
"truncated": false,
"vulnerabilities": [
{
"matches": [{ "product": "openssl", "ecosystem": "npm", "ranges": [{ "introduced": "0.0.1", "fixed": "1.1.0" }], "cveId": "CVE-2026-10001" }],
"confidence": { "score": 80, "factors": ["exact_name_match", "version_in_vulnerable_range"], "level": "high" },
"cveId": "CVE-2026-10001",
"source": "osv",
"ecosystem": "npm",
"osvId": "GHSA-75w2-qv55-x7fv",
"summary": "openssl (npm) prototype pollution",
"severity": [{ "type": "CVSS_V3", "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N" }],
"references": [{ "type": "ADVISORY", "url": "https://github.com/advisories/GHSA-75w2-qv55-x7fv" }]
}
],
"totalVulnerabilities": 1,
"highConfidenceCount": 1
},
"timestamp": "2026-10-15T19:51:47.988Z"
}The single advisory above belongs to an npm package that happens to be named openssl, not to the OpenSSL library. That is the expected result for a C library under the current ecosystem selection; see What is queried.
Response Fields
Top level (data)
| Field | Type | Description |
|---|---|---|
package | string | The name as requested |
normalizedName | string | The name used for the version lookup and the OSV query, with any package-set prefix removed (python3Packages becomes requests) |
nixpkgsVersions | object | Versions keyed by channel: nixpkgs-unstable and the current and previous NixOS releases. Empty when no version source answered |
newestVersion | string|null | Newest version the version source reports. From Repology this spans every repository it tracks, nixpkgs or not, so it can be ahead of every nixpkgs channel. Absent when no version source answered |
versionSource | string|null | repology or nixos-search, whichever supplied nixpkgsVersions. null when neither did |
degraded | boolean | Present, and true, only when versionSource is null. See Degraded responses |
vulnerabilities | array | One entry per OSV advisory, sorted by confidence descending |
totalVulnerabilities | number | Length of vulnerabilities |
highConfidenceCount | number | Entries whose confidence is high |
truncated | boolean | true when OSV held more pages for an ecosystem than this endpoint's bound reads (4 pages or 12 MB per ecosystem) |
Channel version (nixpkgsVersions.<channel>)
| Field | Type | Description |
|---|---|---|
version | string | Version in that channel |
status | string|null | Repology's status for it: newest, outdated, devel and so on |
vulnerable | boolean | Repology's vulnerable flag. Present only when versionSource is repology, and false whenever the Repology data carries no flag, so false is not an assertion that the version is safe |
Vulnerability
| Field | Type | Description |
|---|---|---|
osvId | string | OSV identifier (GHSA-, PYSEC-, GO-) |
cveId | string | The CVE alias when the record carries one, otherwise the OSV identifier |
source | string | Always osv |
ecosystem | string | OSV ecosystem the advisory was found under (npm, PyPI, Go, ...) |
confidence | object | { score, factors, level }; see Confidence |
matches | array | One { product, ecosystem, ranges, cveId } entry per affected package in the record whose name matches the query |
summary | string|undefined | Advisory summary, when OSV's record carries one |
severity | array|undefined | OSV severity entries, when present |
references | array|undefined | OSV reference objects, when present |
What is queried
The endpoint makes two lookups and joins them.
- Versions. Repology (or the service's copy of it) is asked for the project; if it has no nixpkgs entry, the NixOS package search is tried, using the last segment of a dotted name. The result fills
nixpkgsVersions. - Advisories. OSV is queried for
normalizedNamein a set of ecosystems chosen from the requested name:PyPIfor names containingpythonor startingpy,npmfornodeornpm,RubyGemsforrubyorgem,Goforgo,crates.ioforrustorcargo. A name matching none of these is queried innpm,PyPIandGo. These are substring tests on the requested name:djangois queried inGoalone and returns nothing, whilepython3Packages.djangois queried inPyPIas well.
No distribution ecosystem (Debian, Ubuntu, Alpine and so on) is queried, and the nixpkgs security issues are not consulted. For a C library such as curl or openssl the result is usually empty or holds an unrelated same-named language package. An empty vulnerabilities array means OSV holds nothing under that name in the ecosystems listed above; it is not evidence that the nixpkgs package is free of vulnerabilities. For CVE coverage of a C library use CVE Lookup, Nix CVEs or the nixpkgs security issues.
Confidence
The scoring rules are:
| Factor | Points | Condition |
|---|---|---|
exact_name_match | 40 | An affected package in the record has exactly normalizedName |
partial_name_match | 20 | One name contains the other |
version_in_vulnerable_range | 30 | The nixpkgs-unstable version falls before a range's fixed event |
version_fixed | 10 | The nixpkgs-unstable version is at or past a range's fixed event |
critical_severity | 10 | CVSS 9.0 or above, or OSV severity CRITICAL |
high_severity | 5 | CVSS 7.0 or above, or OSV severity HIGH |
Each factor counts once at its strongest, not once per matching entry in the record, so the maximum score is 80 (exact_name_match + one of the version/severity factors) in practice; 100 would need every factor to fire at once. level is high at 70 or above, medium at 40 or above, and low below that.
Severity is read from the record's own CVSS v3 vector when one parses; when none does, it falls back to a GitHub-style severity word (database_specific.severity) if the record carries one. Version ranges are read as ordered introduced/fixed intervals per matching affected entry; last_affected is treated as inclusive, and an interval with no fixed event counts as still vulnerable. The full record for any entry is available from OSV Details by its osvId.
Degraded responses
When neither Repology nor the NixOS package search returns versions for the name, the response carries versionSource: null and degraded: true, nixpkgsVersions is empty and newestVersion is absent. OSV is still queried, so vulnerabilities can be populated. A live response for golang.org/x/crypto, with vulnerabilities truncated to its first entry:
{
"success": true,
"data": {
"package": "golang.org/x/crypto",
"normalizedName": "golang.org/x/crypto",
"nixpkgsVersions": {},
"versionSource": null,
"degraded": true,
"truncated": false,
"vulnerabilities": [
{
"matches": [{ "product": "golang.org/x/crypto", "ecosystem": "Go", "ranges": [{ "introduced": "0", "fixed": "0.17.0" }], "cveId": "CVE-2023-48795" }],
"confidence": { "score": 70, "factors": ["exact_name_match", "version_in_vulnerable_range"], "level": "high" },
"cveId": "CVE-2023-48795",
"source": "osv",
"ecosystem": "Go",
"osvId": "GHSA-3vm4-22fp-5rfm",
"summary": "golang.org/x/crypto vulnerable to Terrapin Attack",
"severity": [{ "type": "CVSS_V3", "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N" }]
}
],
"totalVulnerabilities": 58,
"highConfidenceCount": 9
},
"timestamp": "2026-10-15T19:55:05.238Z"
}The same shape is returned for a name nixpkgs does not carry at all and for one whose version lookup failed; the response does not distinguish the two. Degraded responses are served with Cache-Control: no-store and are never cached.
Errors
| Status | Body | Cause |
|---|---|---|
400 | {"success": false, "error": "Invalid package name"} | The name contains a character outside the allowed set |
404 | {"success": false, "error": "Not found | No package segment in the path (/api) |
500 | {"success": false, "error": "Failed to find vulnerabilities"} | OSV did not answer. The endpoint fails rather than return an empty list for a package it could not check |
429 | See Rate Limits | Rate limit exceeded |
Examples
curl "https://api.vulnpatch.dev/api/v1/vulns/openssl"
curl "https://api.vulnpatch.dev/api/v1/vulns/python3Packages.requests"async function listAdvisories(packageName) {
const response = await fetch(
`https://api.vulnpatch.dev/api/v1/vulns/${packageName}`
);
const body = await response.json();
if (!body.success) throw new Error(body.error);
const { data } = body;
if (data.degraded) {
console.warn(`No nixpkgs versions found for ${data.package}`);
} else {
console.log(`nixpkgs-unstable: ${data.nixpkgsVersions['nixpkgs-unstable']?.version}`);
}
for (const v of data.vulnerabilities) {
console.log(`${v.osvId} (${v.ecosystem})`);
}
}import requests
def list_advisories(package_name):
body = requests.get(
f'https://api.vulnpatch.dev/api/v1/vulns/{package_name}'
).json()
if not body['success']:
raise RuntimeError(body['error'])
data = body['data']
if data.get('degraded'):
print(f"No nixpkgs versions found for {data['package']}")
else:
unstable = data['nixpkgsVersions'].get('nixpkgs-unstable', {})
print(f"nixpkgs-unstable: {unstable.get('version')}")
for v in data['vulnerabilities']:
print(f"{v['osvId']} ({v['ecosystem']})")Differences from /osv
| Aspect | /osv | /vulns |
|---|---|---|
| Ecosystems queried | All OSV ecosystems, or one via ?ecosystem | Chosen from the name; defaults to npm, PyPI, Go |
| nixpkgs versions | No | Yes, per channel |
| Per-advisory confidence | No | Yes, scored from the matched affected entry's name, version range and severity |
| Name normalization | No | Package-set prefixes stripped |
Caching
Successful, non-degraded responses are cached at the edge for two hours, keyed on the full URL. X-Cache reads HIT or MISS; a hit also carries X-Cache-Time, and its timestamp is the time the cached response was built, not the time of the request.