# NVD API

> Returns CVE records from the NIST National Vulnerability Database by id, keyword, severity or affected CPE, with CVSS scores, CWE ids and change history.

Category: Developer & Tech. Region: global. 4 endpoints at `https://api.hoshime.com/v1/nvd/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/nvd
## GET /v1/nvd/cve

One CVE vulnerability record from the NIST National Vulnerability Database: description, CVSS score and severity, weakness (CWE) ids and references.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | CVE id, such as CVE-2021-44228. (e.g. CVE-2021-44228) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `cvssVersion` (string), `description` (string), `id` (string), `lastModifiedAt` (string), `publishedAt` (string), `references` (Reference[]), `references[].source` (string), `references[].url` (string), `score` (number (double)), `severity` (string), `status` (string), `url` (string), `vector` (string), `weaknesses` (string[])

```bash
curl "https://api.hoshime.com/v1/nvd/cve?id=CVE-2021-44228" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/nvd/search

Search the NIST National Vulnerability Database for CVE records by keyword and CVSS v3 severity, newest pages first as NVD orders them.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | no | Keyword to find in the CVE descriptions, such as log4j. (e.g. log4j) |
| `severity` | string | no | CVSS v3 severity: LOW, MEDIUM, HIGH or CRITICAL. (one of LOW, MEDIUM, HIGH, CRITICAL) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `cvssVersion` (string), `description` (string), `id` (string), `lastModifiedAt` (string), `publishedAt` (string), `references` (Reference[]), `references[].source` (string), `references[].url` (string), `score` (number (double)), `severity` (string), `status` (string), `url` (string), `vector` (string), `weaknesses` (string[])

```bash
curl "https://api.hoshime.com/v1/nvd/search?query=log4j&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/nvd/cvesByProduct

The CVE vulnerabilities that affect one software version, found by its CPE name such as cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cpe` | string | yes | CPE 2.3 name of the product and version, such as cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*. (e.g. cpe:2.3:a:apache:log4j:2.14.1:*:*:*:*:*:*:*) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 3) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `cvssVersion` (string), `description` (string), `id` (string), `lastModifiedAt` (string), `publishedAt` (string), `references` (Reference[]), `references[].source` (string), `references[].url` (string), `score` (number (double)), `severity` (string), `status` (string), `url` (string), `vector` (string), `weaknesses` (string[])

```bash
curl "https://api.hoshime.com/v1/nvd/cvesByProduct?cpe=cpe%3A2.3%3Aa%3Aapache%3Alog4j%3A2.14.1%3A*%3A*%3A*%3A*%3A*%3A*%3A*&limit=3" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/nvd/cveHistory

The changes NVD made to one CVE record over time: modified scores, references, descriptions and CPEs, newest first.

Scope: `social:read` · Units: 1 · Cached: 30 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | CVE id, such as CVE-2021-44228. (e.g. CVE-2021-44228) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 100. (default 20; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `createdAt` (string), `details` (ChangeItem[]), `details[].action` (string), `details[].newValue` (string), `details[].oldValue` (string), `details[].type` (string), `event` (string), `id` (string), `source` (string)

```bash
curl "https://api.hoshime.com/v1/nvd/cveHistory?id=CVE-2021-44228&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
