Skip to main content
Glama

cve_discovery

Identify Common Vulnerabilities and Exposures (CVEs) by analyzing detected technologies and their versions to support security assessments.

Instructions

Discover CVEs based on detected technologies and versions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
technologiesYesArray of detected technologies with versions

Implementation Reference

  • Core handler function that orchestrates CVE discovery across multiple databases (NVD, ExploitDB, Vulners, MITRE) for detected technologies, deduplicates results, sorts by severity, and returns formatted ScanResult.
    async discoverCVEs(technologies: TechDetectionResult[]): Promise<ScanResult> { try { const cveResults: CVEResult[] = []; console.error(`🔍 Discovering CVEs for ${technologies.length} technologies...`); for (const tech of technologies) { console.error(` Searching CVEs for ${tech.technology} ${tech.version || ''}`); // Search multiple CVE databases const nvdResults = await this.searchNVD(tech); const exploitDbResults = await this.searchExploitDB(tech); const vulnersResults = await this.searchVulners(tech); const mitreResults = await this.searchMITRE(tech); cveResults.push(...nvdResults, ...exploitDbResults, ...vulnersResults, ...mitreResults); } // Remove duplicates and sort by CVSS score const uniqueCVEs = this.deduplicateCVEs(cveResults); const sortedCVEs = uniqueCVEs.sort((a, b) => b.cvss_score - a.cvss_score); return { target: 'cve_discovery', timestamp: new Date().toISOString(), tool: 'cve_discovery', results: { total_cves_found: sortedCVEs.length, critical_cves: sortedCVEs.filter(c => c.severity === 'critical').length, high_cves: sortedCVEs.filter(c => c.severity === 'high').length, exploitable_cves: sortedCVEs.filter(c => c.exploit_available).length, cves: sortedCVEs.slice(0, 50), // Top 50 most critical technology_coverage: technologies.map(t => ({ technology: t.technology, version: t.version, cve_count: sortedCVEs.filter(c => c.affected_product.toLowerCase().includes(t.technology.toLowerCase()) ).length })) }, status: 'success' }; } catch (error) { return { target: 'cve_discovery', timestamp: new Date().toISOString(), tool: 'cve_discovery', results: {}, status: 'error', error: error instanceof Error ? error.message : String(error) }; } }
  • src/index.ts:546-547 (registration)
    Tool call routing in the main MCP server handler: dispatches 'cve_discovery' calls to the CVEDiscoveryEngine instance.
    case "cve_discovery": return respond(await this.cveDiscovery.discoverCVEs(args.technologies));
  • MCP tool registration including name, description, and input schema definition for 'cve_discovery'.
    name: "cve_discovery", description: "Discover CVEs based on detected technologies and versions", inputSchema: { type: "object", properties: { technologies: { type: "array", items: { type: "object" }, description: "Array of detected technologies with versions" } }, required: ["technologies"] }
  • TypeScript interface defining the structure of CVE results used in the tool's output.
    export interface CVEResult { cve_id: string; cvss_score: number; severity: 'low' | 'medium' | 'high' | 'critical'; description: string; published_date: string; modified_date: string; affected_product: string; affected_version: string; references: string[]; exploit_available: boolean; exploit_links: string[]; cwe_id?: string; vector_string?: string; }
  • src/index.ts:59-59 (registration)
    Instantiation of the CVEDiscoveryEngine class in the main PentestMCPServer constructor.
    this.cveDiscovery = new CVEDiscoveryEngine();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adriyansyah-mf/mcp-pentest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server