Vulnerability Inference

or more specifically, version-based vulnerability inference

Often, you have a piece of software and a version, and need to turn that into a list of vulnerabilities known to exist in the software. Having a vulnerability "inference" api that accepts a CPE or the requisite vendor/product/version information can come in handy in these cases. Below, we'll walk you through the process of first matching the vendor and product to the Mallory database, then matching vulnerabilities using the known product information and the version information.

Vulnerability matching to a specific version of software is a two step process. First, you'll want to match your vendor (or publisher) and product name to the Mallory database to get the appropriate vendor and product name. Then, you can use the vulnerable_configurations endpoint to get the list of vulnerable configurations for a given vendor, product and version.

Product Matching

In order to match your own product information against the Mallory database, you can use the following endpoint. This will query the Mallory database for products and vendors that match a given product name or fragment. Multiple results will be returned if multiple products match.

Search Products

post

Endpoint to search for products based on search criteria.

Authorizations
Query parameters
offsetintegerOptional

The number of items to skip before starting to collect the result set.

Default: 0
limitinteger · min: 1Optional

The maximum number of items to return.

Default: 100
sortstringOptional

Field to sort by - either name, created_at or updated_at

Default: created_atPattern: ^(name|created_at|updated_at)$
orderstringOptional

Sort order - either asc or desc

Default: descPattern: ^(asc|desc)$
Body

The search criteria for products

cpestring | nullableOptional

Common Platform Enumeration (CPE) 2.3 string. Overrides type, vendor, and product if provided.

productstring | nullableOptional

The name of the product.

search_typestringOptional

The type of search to perform. Options are: 'standard', 'did_you_mean'. Defaults to 'standard'.

Default: standardExample: ["standard","did_you_mean"]
typestring | nullableOptional

The type of the product (e.g., application, operating system). Defaults to 'application'.

vendorstring | nullableOptional

The vendor of the product.

Responses
200
Successful Response
application/json
post
POST /v1/products/search HTTP/1.1
Host: api.mallory.ai
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 103

{
  "cpe": "text",
  "product": "text",
  "search_type": [
    "standard",
    "did_you_mean"
  ],
  "type": "text",
  "vendor": "text"
}
{
  "data": [
    {
      "created_at": "2025-06-27T09:50:50.223Z",
      "description": "text",
      "display_name": "text",
      "name": "text",
      "type": "text",
      "updated_at": "2025-06-27T09:50:50.223Z",
      "upstream_id": "text",
      "uuid": "text",
      "website": "text"
    }
  ],
  "limit": 1,
  "message": "text",
  "offset": 1,
  "total": 1
}

Vulnerability Matching

Now that you know the correct vendor and product to look up, you can use the vulnerable configuration search to identify associated vulnerabilities for this product and version information. Vulnerable configurations are a set of vulnerable configurations associated with a given vulnerability. In some cases, there is more than one item in a set of vulnerable configurations (such as the underlying OS and Hardware) - you can use the 'include_set_results' parameter to ensure these are included.

Vulnerable Configuration Search

post

Endpoint to search for vulnerabilities.

Authorizations
Query parameters
offsetintegerOptional

The number of items to skip before starting to collect the result set.

Default: 0
limitinteger · min: 1Optional

The maximum number of items to return.

Default: 100
sortstringOptional

Field to sort by - either created_at, updated_at, published_at, or collected_at

Default: published_atPattern: ^(created_at|updated_at|published_at|collected_at)$
orderstringOptional

Sort order - either asc or desc

Default: descPattern: ^(asc|desc)$
Body

The search criteria for vulnerable configurations

cpestring | nullableOptional

Common Platform Enumeration (CPE) 2.3 string. Overrides type, vendor, and product if provided.

include_set_resultsbooleanOptional

Whether to include all items found in matched config sets. (Defaults to False)

Default: falseExample: [false,true]
productstringRequired

The name of the product.

Example: ["ExampleProduct","Windows","macOS"]
typestring | nullableOptional

The type of the product (e.g., application, operating system). Defaults to 'application'.

updatestring | nullableOptional

The update version of the product.

vendorstringRequired

The vendor of the product.

Example: ["ExampleVendor","Microsoft","Apple"]
versionstring | nullableOptional

The version of the product.

version_matchstringOptional

The method used for version matching. Options are: 'exact'. Defaults to 'exact'.

Default: exactExample: ["exact"]
Responses
200
Successful Response
application/json
post
POST /v1/vulnerable_configurations/search HTTP/1.1
Host: api.mallory.ai
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 216

{
  "cpe": "text",
  "include_set_results": [
    false,
    true
  ],
  "product": [
    "ExampleProduct",
    "Windows",
    "macOS"
  ],
  "type": "text",
  "update": "text",
  "vendor": [
    "ExampleVendor",
    "Microsoft",
    "Apple"
  ],
  "version": "text",
  "version_match": [
    "exact"
  ]
}
{
  "data": [
    {
      "cpe23_uri": "text",
      "cpe_id": "text",
      "created_at": "2025-06-27T09:50:50.223Z",
      "edition": "text",
      "is_vulnerable": true,
      "language": "text",
      "other": "text",
      "set_id": "text",
      "sw_edition": "text",
      "target_hw": "text",
      "target_sw": "text",
      "updateEndIncluding": "text",
      "updateStartIncluding": "text",
      "updated_at": "2025-06-27T09:50:50.223Z",
      "uuid": "text",
      "versionEndExcluding": "text",
      "versionEndIncluding": "text",
      "versionStartExcluding": "text",
      "versionStartIncluding": "text"
    }
  ],
  "limit": 1,
  "message": "text",
  "offset": 1,
  "total": 1
}

Vulnerable Configuration Search

post

Endpoint to search for vulnerabilities.

Authorizations
Query parameters
offsetintegerOptional

The number of items to skip before starting to collect the result set.

Default: 0
limitinteger · min: 1Optional

The maximum number of items to return.

Default: 100
sortstringOptional

Field to sort by - either created_at, updated_at, published_at, or collected_at

Default: published_atPattern: ^(created_at|updated_at|published_at|collected_at)$
orderstringOptional

Sort order - either asc or desc

Default: descPattern: ^(asc|desc)$
Body

The search criteria for vulnerable configurations

cpestring | nullableOptional

Common Platform Enumeration (CPE) 2.3 string. Overrides type, vendor, and product if provided.

include_set_resultsbooleanOptional

Whether to include all items found in matched config sets. (Defaults to False)

Default: falseExample: [false,true]
productstringRequired

The name of the product.

Example: ["ExampleProduct","Windows","macOS"]
typestring | nullableOptional

The type of the product (e.g., application, operating system). Defaults to 'application'.

updatestring | nullableOptional

The update version of the product.

vendorstringRequired

The vendor of the product.

Example: ["ExampleVendor","Microsoft","Apple"]
versionstring | nullableOptional

The version of the product.

version_matchstringOptional

The method used for version matching. Options are: 'exact'. Defaults to 'exact'.

Default: exactExample: ["exact"]
Responses
200
Successful Response
application/json
post
POST /v1/vulnerable_configurations/search HTTP/1.1
Host: api.mallory.ai
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 216

{
  "cpe": "text",
  "include_set_results": [
    false,
    true
  ],
  "product": [
    "ExampleProduct",
    "Windows",
    "macOS"
  ],
  "type": "text",
  "update": "text",
  "vendor": [
    "ExampleVendor",
    "Microsoft",
    "Apple"
  ],
  "version": "text",
  "version_match": [
    "exact"
  ]
}
{
  "data": [
    {
      "cpe23_uri": "text",
      "cpe_id": "text",
      "created_at": "2025-06-27T09:50:50.223Z",
      "edition": "text",
      "is_vulnerable": true,
      "language": "text",
      "other": "text",
      "set_id": "text",
      "sw_edition": "text",
      "target_hw": "text",
      "target_sw": "text",
      "updateEndIncluding": "text",
      "updateStartIncluding": "text",
      "updated_at": "2025-06-27T09:50:50.223Z",
      "uuid": "text",
      "versionEndExcluding": "text",
      "versionEndIncluding": "text",
      "versionStartExcluding": "text",
      "versionStartIncluding": "text"
    }
  ],
  "limit": 1,
  "message": "text",
  "offset": 1,
  "total": 1
}

Additional Notes

  • Mallory's database is a superset of the NVD CPE database.

Last updated