---
title: "OSV API: Get an OSV vulnerability record | Perceptlayer"
description: "One vulnerability from OSV by OSV, GHSA or CVE id: summary, details, aliases, CVSS, affected packages with fixed versions, references and source licence."
url: https://perceptlayer.com/apis/osv/vuln
---

[APIs](https://perceptlayer.com/apis) / [OSV](https://perceptlayer.com/apis/osv) / Get an OSV vulnerability record

# OSV: Get an OSV vulnerability record

One vulnerability from OSV by OSV, GHSA or CVE id: summary, details, aliases, CVSS, affected packages with fixed versions, references and source licence.

GET `/v1/osv/vuln`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `id` | string | Required | Up to 80 characters Vulnerability id, such as GHSA-jfh8-c2jp-5v3q or CVE-2021-44228. |

## Example request

OSV

GET /v1/osv/vuln?id=GHSA-jfh8-c2jp-5v3q 

```
{
  "success": true,
  "data": {
    "id": "GHSA-jfh8-c2jp-5v3q",
    "summary": "Remote code injection in Log4j",
    "aliases": [
      "CVE-2021-44228"
    ],
    "severity": [
      {
        "type": "CVSS_V3",
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:H"
      }
    ],
    "database_severity": "CRITICAL",
    "cwe_ids": [
      "CWE-20",
      "CWE-400",
      "CWE-502"
    ],
    "published": "2021-12-10T00:40:56Z",
    "modified": "2025-10-22T19:37:02.616807Z",
    "source": {
      "database": "GitHub Advisory Database",
      "license": "CC-BY-4.0"
    },
    "url": "https://osv.dev/vulnerability/GHSA-jfh8-c2jp-5v3q",
    "details": "# Summary\n\nLog4j versions prior to 2.16.0 are subject to a remote code execution vulnerability via the ldap JNDI parser.\nAs per [Apache's Log4j security guide](https://logging.apache.org/log4j/2.x/security.html): Apache Log4j2 <=2.14.1 JNDI…",
    "affected": [
      {
        "ecosystem": "Maven",
        "package": "org.apache.logging.log4j:log4j-core",
        "purl": "pkg:maven/org.apache.logging.log4j/log4j-core",
        "ranges": [
          {
            "type": "ECOSYSTEM",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "versions_count": 6,
        "fixed_versions": [
          "2.15.0"
        ]
      },
      {
        "ecosystem": "Maven",
        "package": "org.apache.logging.log4j:log4j-core",
        "purl": "pkg:maven/org.apache.logging.log4j/log4j-core",
        "ranges": [
          {
            "type": "ECOSYSTEM",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "versions_count": 9,
        "fixed_versions": [
          "2.3.1"
        ]
      },
      {
        "ecosystem": "Maven",
        "package": "org.apache.logging.log4j:log4j-core",
        "purl": "pkg:maven/org.apache.logging.log4j/log4j-core",
        "ranges": [
          {
            "type": "ECOSYSTEM",
            "events": [
              "…",
              "…"
            ]
          }
        ],
        "versions_count": 18,
        "fixed_versions": [
          "2.12.2"
        ]
      }
    ],
    "affected_total": 10,
    "references": [
      {
        "type": "ADVISORY",
        "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44228"
      },
      {
        "type": "WEB",
        "url": "https://github.com/apache/logging-log4j2/pull/608"
      },
      {
        "type": "WEB",
        "url": "https://github.com/github/advisory-database/pull/5501"
      }
    ]
  },
  "meta": {
    "request_id": "req_559cc5dcffe749a78fedd962ee51e628",
    "credits_charged": 1,
    "credits_remaining": 162
  }
}
```

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=vuln#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

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

| Field | Type |
| --- | --- |
| `id` | string |
| `summary` | string |
| `aliases` | string\[\] |
| `severity` | object\[\] |
| `database_severity` | string |
| `cwe_ids` | string\[\] |
| `published` | string |
| `modified` | string |
| `url` | url |
| `details` | string |
| `affected` | object\[\] |
| `affected_total` | integer |
| `references` | object\[\] |
