Skip to content

VulnDB Executor

Category: Vulnerability Scanners Script: vulndb.py Integration: REST API (HMAC) Faraday Plugin: Raw JSON Website: https://vulndb.flashpoint.io

Description

Queries the VulnDB (Flashpoint) vulnerability database for the vulnerabilities that affect a CPE or a vendor/product and imports them into Faraday. VulnDB has no assets of its own, so each query target becomes a synthetic host with the matching vulnerabilities attached.

Prerequisites

  • A VulnDB (Flashpoint) subscription with API access
  • A VulnDB API consumer key and secret
  • Network access from the agent to the VulnDB API (https://vulndb.cyberriskanalytics.com by default)

Configuration

Environment Variables (Setup)

Variable Required Description
VULNDB_KEY Yes VulnDB API consumer key
VULNDB_SECRET Yes VulnDB API consumer secret, used to sign each request
VULNDB_HOST No VulnDB API base URL (default: https://vulndb.cyberriskanalytics.com)

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
VULNDB_CPE string No* CPE 2.3 string to query (e.g., cpe:2.3:a:apache:http_server:2.4.54)
VULNDB_VENDOR string No* Vendor name or numeric VulnDB vendor ID (e.g., apache or 15)
VULNDB_PRODUCT string No Product name to narrow the vendor query (e.g., http_server). Ignored without VULNDB_VENDOR.
VULNDB_LIMIT integer No Maximum number of vulnerabilities to import per query (default: 100)

* You must set VULNDB_CPE, VULNDB_VENDOR, or both.

YAML Configuration Example

executors:
  vulndb:
    repo_executor: vulndb.py
    max_size: 65536
    varenvs:
      VULNDB_KEY: "<consumer_key>"
      VULNDB_SECRET: "<consumer_secret>"
    params:
      VULNDB_CPE:
        mandatory: false
        type: string
        base: string
      VULNDB_VENDOR:
        mandatory: false
        type: string
        base: string
      VULNDB_PRODUCT:
        mandatory: false
        type: string
        base: string
      VULNDB_LIMIT:
        mandatory: false
        type: integer
        base: integer

How It Works

  1. Signs every request with HMAC-SHA1 using VULNDB_KEY and VULNDB_SECRET
  2. If VULNDB_CPE is set, queries /api/v1/vulnerabilities?cpe=<cpe>
  3. If VULNDB_VENDOR is set, resolves a vendor name to its ID with /api/v1/vendors and queries /api/v1/vendors/{id}/vulnerabilities, filtered by VULNDB_PRODUCT when given
  4. Pages through the results (up to 100 per page) until VULNDB_LIMIT is reached
  5. Maps each entry to a vulnerability:
    • Name: the VulnDB title
    • Description: description, technical description and disclosure date
    • Severity: from the CVSS score: 0 is info, below 4 low, below 7 medium, below 9 high, otherwise critical. Entries without a score are info.
    • Resolution: the VulnDB solution
    • References: external references and CVE IDs
    • External ID: the VulnDB ID

Notes

  • Each query creates one host with IP 0.0.0.0. Its hostname is the CPE string, or vendor / vendor/product for vendor queries. Queries that return no vulnerabilities create no host.
  • When the vendor name has no exact match, the first result of the vendor lookup is used.
  • Every vulnerability is tagged vulndb and created with status open.
  • At most 50 pages are read per query.
  • TLS certificates are not verified.
  • The run fails if the key or secret is rejected (401). Other API errors stop the query and import what was already fetched.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.