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();
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Discover CVEs') but doesn't describe how it behaves—e.g., whether it queries a database, performs live scanning, returns detailed CVE information, has rate limits, or requires specific permissions. This leaves significant gaps for a security tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that is front-loaded with the core purpose. There is no wasted text, and it directly communicates the tool's function without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of CVE discovery in a security context, no annotations, no output schema, and a simple input schema, the description is incomplete. It doesn't cover behavioral aspects, output format, error handling, or integration with sibling tools, making it inadequate for informed tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal meaning beyond the input schema, which has 100% coverage. It implies that 'technologies' should include versions for CVE matching, but doesn't specify format, examples, or constraints. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Discover') and resource ('CVEs'), and it specifies the input basis ('based on detected technologies and versions'). However, it doesn't explicitly differentiate from sibling tools like 'tech_detection' or 'exploit_attempt', which might have overlapping security contexts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing detected technologies from 'tech_detection'), exclusions, or comparisons to siblings like 'nuclei_scan' or 'metasploit_search' that might also involve CVE-related operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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