---
updatedAt: 2026-07-26T12:31:37.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/security/llms.txt
---

# Search Resources by Vulnerability and Package

Search all resources (Artifacts, Builds, Release Bundles, etc.) that include a specific package or are impacted by a specific vulnerability (CVE or XRAY ID). Supports three search modes:

- **Mode 1 - By Vulnerability**: `vulnerability` is required.
- **Mode 2 - By Package Version**: `name` and `type` are required; `version` is optional.
- **Mode 3 - By Package (all versions)**: `name` and `type` are required; omit `version`.

**SBOM Requirement**: This capability depends on the SBOM Service. Self-Hosted users must enable the SBOM feature and complete the SBOM migration. If SBOM is disabled, the API returns 403.

**Pagination**: Use `last_key` from the response to fetch subsequent pages; an empty `last_key` indicates no further results. Limit defaults to 1000, maximum 10000.

Requires the Reports Manager permission. Since Xray 3.131.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Xray REST APIs",
    "description": "Combined JFrog Xray REST API specification (all endpoints).",
    "version": "3.140"
  },
  "servers": [
    {
      "url": "https://jf.example.com/xray",
      "description": "JFrog Platform (Xray)"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/api/v2/search/impactedResources": {
      "get": {
        "operationId": "search-resources-by-vulnerability-and-package",
        "summary": "Search Resources by Vulnerability and Package",
        "description": "Search all resources (Artifacts, Builds, Release Bundles, etc.) that include a specific package or are impacted by a specific vulnerability (CVE or XRAY ID). Supports three search modes:\n\n- **Mode 1 - By Vulnerability**: `vulnerability` is required.\n- **Mode 2 - By Package Version**: `name` and `type` are required; `version` is optional.\n- **Mode 3 - By Package (all versions)**: `name` and `type` are required; omit `version`.\n\n**SBOM Requirement**: This capability depends on the SBOM Service. Self-Hosted users must enable the SBOM feature and complete the SBOM migration. If SBOM is disabled, the API returns 403.\n\n**Pagination**: Use `last_key` from the response to fetch subsequent pages; an empty `last_key` indicates no further results. Limit defaults to 1000, maximum 10000.\n\nRequires the Reports Manager permission. Since Xray 3.131.\n",
        "tags": [
          "Search V2"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of resources to return. Default: 1000. Maximum: 10000.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "last_key",
            "in": "query",
            "description": "Pagination cursor from the previous response. Include this value to retrieve the next page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vulnerability",
            "in": "query",
            "description": "Vulnerability ID in CVE format (CVE-YYYY-NNNNN) or XRAY format (XRAY-N). Required for Mode 1.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Package name. Required for Mode 2 and Mode 3.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Package type (e.g., npm, maven, pypi). Required for Mode 2 and Mode 3.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "Package version. When provided with name and type, searches for a specific version.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "namespace",
            "in": "query",
            "description": "Package namespace. Default: public.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ecosystem",
            "in": "query",
            "description": "Package ecosystem. Default: generic.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "array",
                      "description": "Array of resources matching the search criteria.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "Resource type: Artifact, Build, ReleaseBundle, ReleaseBundleV2, AppVersion, Component."
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the resource."
                          },
                          "path": {
                            "type": "string",
                            "description": "Artifact path in the repository."
                          },
                          "repo": {
                            "type": "string",
                            "description": "Repository name."
                          },
                          "version": {
                            "type": "string",
                            "description": "Version of the resource."
                          },
                          "artifact_name": {
                            "type": "string",
                            "description": "Name of the artifact within an aggregation."
                          },
                          "artifact_pkg_version": {
                            "type": "object",
                            "description": "Package version info for the artifact containing the impacted package.",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "namespace": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              },
                              "ecosystem": {
                                "type": "string"
                              }
                            }
                          },
                          "scan_date": {
                            "type": "string",
                            "description": "ISO 8601 timestamp of when the resource was last scanned."
                          },
                          "impacted_pkg_version": {
                            "type": "object",
                            "description": "Package version info for the impacted package matching the search.",
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "namespace": {
                                "type": "string"
                              },
                              "version": {
                                "type": "string"
                              },
                              "ecosystem": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "last_key": {
                      "type": "string",
                      "description": "Pagination cursor. Empty string means no more results."
                    }
                  }
                },
                "example": {
                  "result": [
                    {
                      "type": "Artifact",
                      "name": "app.jar",
                      "path": "libs-release-local/com/example/app/1.0.0/app-1.0.0.jar",
                      "repo": "libs-release-local",
                      "scan_date": "2024-01-15T10:30:00Z",
                      "artifact_pkg_version": {
                        "type": "maven",
                        "name": "app",
                        "namespace": "com.example",
                        "version": "1.0.0",
                        "ecosystem": "generic"
                      },
                      "impacted_pkg_version": {
                        "type": "maven",
                        "name": "log4j-core",
                        "namespace": "org.apache.logging.log4j",
                        "version": "2.14.1",
                        "ecosystem": "generic"
                      }
                    }
                  ],
                  "last_key": "eyJwcmltYXJ5S2V5IjoiMTIzNDU2Nzg5MCJ9"
                }
              }
            }
          },
          "400": {
            "description": "Missing required parameters or invalid values.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Mandatory parameters: \"vulnerability\" OR (\"type\", \"name\", [\"version\"])"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied or SBOM feature is disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "SBOM is disabled"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              },
              "example": {
                "result": [
                  {
                    "type": "Artifact",
                    "name": "app.jar",
                    "path": "libs-release-local/com/example/app/1.0.0/app-1.0.0.jar",
                    "repo": "libs-release-local",
                    "scan_date": "2024-01-15T10:30:00Z",
                    "artifact_pkg_version": {
                      "type": "maven",
                      "name": "app",
                      "namespace": "com.example",
                      "version": "1.0.0",
                      "ecosystem": "generic"
                    },
                    "impacted_pkg_version": {
                      "type": "maven",
                      "name": "log4j-core",
                      "namespace": "org.apache.logging.log4j",
                      "version": "2.14.1",
                      "ecosystem": "generic"
                    }
                  }
                ],
                "last_key": "eyJwcmltYXJ5IjoiMTIzNDU2Nzg5MCIsInNlY29uZGFyeSI6ImFiY2RlZjEyMzQ1Njc4OTAifQ=="
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic authentication using username/password or API key"
      }
    }
  },
  "tags": [
    {
      "name": "Search V2",
      "description": "APIs from Search V2"
    }
  ]
}
```