---
title: vulnerabilityCPEtoCVEIds query | Wartiva GraphQL API
description: Returns the ids of the CVEs that affect a product described by CPE 2.3 (Common Platform Enumeration) names. Wartiva GraphQL API reference with examples.
url: https://wartiva.com/api-docs/queries/vulnerability-cpe-to-cve-ids.html
updated: 2026-10-07
---

Vulnerabilities · GraphQL query

# `vulnerabilityCPEtoCVEIds` query

Returns the ids of the CVEs that affect a product described by CPE 2.3 (Common Platform Enumeration) names. Provide at least one and at most one CPE of each part: application, operating system, and hardware. All the given CPEs are matched together, and the ids come back deduplicated and sorted by year, then sequence number. Load each record with [vulnerabilityFetchCVE](https://wartiva.com/api-docs/queries/vulnerability-fetch-cve.html).

## Response

Returns a [`CVEIdsPayload!`](https://wartiva.com/api-docs/types/cve-ids-payload.html)

## Arguments

| Name | Description |
|---|---|
| `orgId` - [`OrganizationId!`](https://wartiva.com/api-docs/types/organization-id.html) | The id of the Organization. |
| `cpe` - [`[String!]!`](https://wartiva.com/api-docs/types/string.html) | Array of CPEs to match against vulnerabilities. |

## Example

### Query

```graphql
query vulnerabilityCPEtoCVEIds(
  $orgId: OrganizationId!,
  $cpe: [String!]!
) {
  vulnerabilityCPEtoCVEIds(
    orgId: $orgId,
    cpe: $cpe
  ) {
    ids
  }
}

```

### Variables

```json
{
  "orgId": "615f3b3b28284380e28a7342",
  "cpe": ["xyz789"]
}

```

### Response

```json
{
  "data": {
    "vulnerabilityCPEtoCVEIds": {
      "ids": ["4"]
    }
  }
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
