---
title: "OSV API: List known vulnerabilities for a package"
description: "Known vulnerabilities for an open source package from OSV, optionally for one version: ids, summary, aliases, CVSS, affected ranges and fixed versions."
url: https://perceptlayer.com/apis/osv/package-vulns
---

[APIs](https://perceptlayer.com/apis) / [OSV](https://perceptlayer.com/apis/osv) / List known vulnerabilities for a package

# OSV: List known vulnerabilities for a package

Known vulnerabilities for an open source package from OSV, optionally for one version: ids, summary, aliases, CVSS, affected ranges and fixed versions.

GET `/v1/osv/package-vulns`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `ecosystem` | string | Required | AlmaLinux, Alpaquita, Android, Azure Linux, BellSoft Hardened Containers, Bitnami, CRAN, CleanStart, Debian, Docker Hardened Images, Echo, GSD, GitHub Actions, Go, Hackage, Hex, Julia, Linux, Maven, MinimOS, NuGet, OSS-Fuzz, Packagist, Pub, PyPI, Red Hat, Red Hat Lightwell, Rocky Linux, RubyGems, SUSE, SwiftURL, crates.io, npm, opam, openEuler, openSUSE Package ecosystem, as OSV names it. |
| `package` | string | Required | Up to 214 characters Package name as the ecosystem writes it, such as lodash, jinja2 or org.apache.logging.log4j:log4j-core. |
| `version` | string | Optional | Up to 100 characters Only vulnerabilities affecting this version. |
| `page_token` | string | Optional | Up to 2,000 characters next\_page\_token from the previous answer, for the next page of a very long list. |

## Example request

OSV

GET /v1/osv/package-vulns?ecosystem=npm&package=lodash 

```
{
  "success": true,
  "data": {
    "ecosystem": "npm",
    "package": "lodash",
    "count": 10,
    "has_more": false,
    "items": [
      {
        "id": "GHSA-29mw-wpgm-hmr9",
        "summary": "Regular Expression Denial of Service (ReDoS) in lodash",
        "aliases": [
          "CVE-2020-28500"
        ],
        "severity": [
          {
            "type": "CVSS_V3",
            "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
          }
        ],
        "database_severity": "MODERATE",
        "cwe_ids": [
          "CWE-1333",
          "CWE-400"
        ],
        "published": "2022-01-06T20:30:46Z",
        "modified": "2025-09-29T21:12:31.102523Z",
        "source": {
          "database": "GitHub Advisory Database",
          "license": "CC-BY-4.0"
        },
        "url": "https://osv.dev/vulnerability/GHSA-29mw-wpgm-hmr9",
        "affected_ranges": [
          {
            "type": "SEMVER",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "fixed_versions": [
          "4.17.21"
        ]
      },
      {
        "id": "GHSA-35jh-r3h4-6jhm",
        "summary": "Command Injection in lodash",
        "aliases": [
          "CVE-2021-23337"
        ],
        "severity": [
          {
            "type": "CVSS_V3",
            "vector": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
          }
        ],
        "database_severity": "HIGH",
        "cwe_ids": [
          "CWE-77",
          "CWE-94"
        ],
        "published": "2021-05-06T16:05:51Z",
        "modified": "2026-10-17T02:55:38.085813876Z",
        "source": {
          "database": "GitHub Advisory Database",
          "license": "CC-BY-4.0"
        },
        "url": "https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm",
        "affected_ranges": [
          {
            "type": "SEMVER",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "fixed_versions": [
          "4.17.21"
        ]
      },
      {
        "id": "GHSA-4xc9-xhrj-v574",
        "summary": "Prototype Pollution in lodash",
        "aliases": [
          "CVE-2018-16487"
        ],
        "database_severity": "HIGH",
        "cwe_ids": [
          "CWE-400"
        ],
        "published": "2019-02-07T18:16:48Z",
        "modified": "2025-08-12T21:55:35.778975Z",
        "source": {
          "database": "GitHub Advisory Database",
          "license": "CC-BY-4.0"
        },
        "url": "https://osv.dev/vulnerability/GHSA-4xc9-xhrj-v574",
        "affected_ranges": [
          {
            "type": "SEMVER",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "fixed_versions": [
          "4.17.11"
        ]
      }
    ]
  },
  "meta": {
    "request_id": "req_e9de1a78ec0a4adfac8f8b3b91eb380d",
    "credits_charged": 1,
    "credits_remaining": 167
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/osv?try=package-vulns#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

`data` has these 3 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `ecosystem` | string |
| `package` | string |
| `items` | object\[\] |
