cve-search - A free software to collect, search and analyse common vulnerabilities and exposures in software

Alexandre Dulaunoy, Pieter-Jan Moreels

BruCON 0x07 · Day 2

Overview

In a landscape increasingly defined by the pervasive threat of software vulnerabilities, the ability to rapidly and accurately access, search, and analyze vulnerability information is paramount for effective cybersecurity. The "cve-search" project, introduced by Alexandre Dulaunoy and Pieter-Jan Moreels at BruCON, addresses critical shortcomings in existing vulnerability management practices by offering a free, open-source tool designed for offline, flexible, and extensible Common Vulnerabilities and Exposures (CVE) data management. This talk delves into the genesis, architecture, and practical applications of cve-search, positioning it as an indispensable resource for security professionals grappling with the complexities of vulnerability assessment and threat intelligence.

Watch on YouTube

Visual summary for cve-search - A free software to collect, search and analyse common vulnerabilities and exposures in software by Alexandre Dulaunoy, Pieter-Jan Moreels
Visual summary for cve-search - A free software to collect, search and analyse common vulnerabilities and exposures in software by Alexandre Dulaunoy, Pieter-Jan Moreels

Key moments

  1. 0:00 Introduction and motivation for cve-search
  2. 4:18 Core architecture and data fetching process
  3. 8:00 Demonstrating search and analysis tools
  4. 14:00 Using CVSS scores for vendor/product comparison
  5. 20:00 Blacklisting and whitelisting specific CPEs
  6. 24:00 Dual-use nature: cve-search for good or bad
  7. 29:00 Challenges with CPE naming conventions
  8. 34:00 Expanding to pre-CVE vulnerabilities and management

cve-search - A free software to collect, search and analyse common vulnerabilities and exposures in software

Speakers: Alexandre Dulaunoy; Pieter-Jan Moreels

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=GyhvnX3BuTU

Overview

In a landscape increasingly defined by the pervasive threat of software vulnerabilities, the ability to rapidly and accurately access, search, and analyze vulnerability information is paramount for effective cybersecurity. The "cve-search" project, introduced by Alexandre Dulaunoy and Pieter-Jan Moreels at BruCON, addresses critical shortcomings in existing vulnerability management practices by offering a free, open-source tool designed for offline, flexible, and extensible Common Vulnerabilities and Exposures (CVE) data management. This talk delves into the genesis, architecture, and practical applications of cve-search, positioning it as an indispensable resource for security professionals grappling with the complexities of vulnerability assessment and threat intelligence.

The core objective of cve-search is to empower security teams with a local, comprehensive repository of vulnerability data, liberating them from the limitations of online-only lookups and rigid data formats. By aggregating information from diverse sources, including the National Vulnerability Database (NVD), and structuring it for efficient querying, the tool facilitates proactive vulnerability identification, risk assessment, and defensive strategizing. The speakers highlight its modular design, command-line utility, and an intuitive web interface as key features that cater to the dynamic needs of modern security operations.

Beyond its technical capabilities, cve-search represents a broader advocacy for open data standards in the security industry. The project's commitment to community contributions and its active call for vendors to provide more parseable vulnerability feeds underscore a vision for a more collaborative and transparent security ecosystem. Dulaunoy and Moreels present cve-search not just as a tool, but as a foundational platform for building more robust and adaptable vulnerability management solutions.

Background

▶ Watch: Introduction and motivation for cve-search (0:00)

The inception of cve-search was driven by a series of frustrations inherent in traditional vulnerability assessment workflows. Alexandre Dulaunoy, one of the co-creators, articulated the paradox of relying on a US-based website (NIST) for vulnerability data when conducting security assessments, posing privacy concerns and practical limitations for non-US entities. This reliance necessitated HTTP search queries over the internet, which was deemed undesirable for sensitive tasks like vulnerability assessment or penetration testing, where offline search capabilities were a critical requirement.

Another significant challenge was the sheer inefficiency of querying remote services for vulnerability lookups during time-sensitive operations like analyzing network intrusion detection system (NIDS) captures or performing rapid infrastructure assessments. The lack of speed and the inherent latency of external lookups severely hampered productivity and responsiveness. Furthermore, vulnerability descriptions often lacked localization, meaning that the context and impact of a vulnerability could vary significantly depending on geographic location or specific business activities, a nuance largely unaddressed by generic descriptions.

The speakers also pointed out the "mess" of information security, particularly concerning vendor-provided vulnerability data. Vendors frequently disseminate vulnerability details through unstructured formats such as web pages or PDF documents, which are notoriously difficult to parse automatically. This inflexibility hindered the aggregation and cross-referencing of data, a crucial aspect of comprehensive vulnerability management. To counteract this, the project aimed for a flexible data structure capable of accommodating diverse information sources. Finally, recognizing the prevalence of Unix-like tools in the security community for scripting and automation, the creators envisioned a solution that could seamlessly integrate into existing workflows, allowing users to script and automate vulnerability research effectively. The project officially commenced in 2012, building upon an initial script by Wim Remes that fetched NIST data into a MongoDB database, which was then significantly expanded and improved upon by Dulaunoy and Moreels.

Key Findings

▶ Watch: Demonstrating search and analysis tools (8:00)

The cve-search project delivers several key findings and contributions that significantly advance the state of vulnerability management:

  • Comprehensive Offline Database: The primary contribution is the establishment of a robust, local, and offline database for CVEs. This eliminates the dependency on remote NIST queries, enhancing speed, privacy, and reliability for vulnerability assessments.
  • Flexible and Extensible Data Structure: By leveraging MongoDB for document storage and Redis for caching, cve-search provides a highly flexible data structure. This design not only accommodates the varied formats of vulnerability information from different vendors but also allows for easy extension with new data sources through its modular db_updater script.
  • Rich Data Aggregation: Beyond the foundational NIST National Vulnerability Database (NVD), cve-search integrates a wealth of supplementary data. This includes Common Platform Enumeration (CPE) for detailed software and hardware identification, Common Weakness Enumeration (CWE) for categorizing software flaws, Common Attack Pattern Enumeration and Classification (CAPEC), official vendor statements, Microsoft Bulletin cross-references, and exploitation references from the d2sec exploitation framework and vFeed. This multi-source aggregation provides a more holistic view of each vulnerability.
  • Unix-like Tooling and Scriptability: A core design principle was to enable seamless integration with existing security workflows. cve-search offers a suite of command-line tools that output data in JSON format, making it highly scriptable and compatible with standard Unix utilities like jq for advanced parsing and analysis.
  • Customizable Localization and Classification: The tool introduces an innovative internal ranking mechanism, allowing organizations to classify and prioritize vulnerabilities based on their specific assets and operational context. This feature enables users to tag and rank CVEs relevant to particular departments (e.g., "accounting" for SAP systems), ensuring that security efforts are focused on the most critical risks.
  • Intuitive Web Interface with Filtering: cve-search includes a user-friendly web interface that visualizes CVE data, marking vulnerabilities as "normal," "seen," "blacklisted," or "whitelisted" through a color-coding scheme. The blacklisting and whitelisting features allow users to filter out irrelevant CVEs (e.g., vulnerabilities for operating systems or applications not deployed within their environment), drastically reducing noise.
  • Public RESTful API: A publicly available RESTful JSON API (cv.circl.lu) offers programmatic access to the entire vulnerability database. This enables developers and penetration testers to integrate cve-search functionalities directly into their custom tools and scripts, fostering further innovation.
  • Statistical Analysis Capabilities: The platform facilitates the extraction and analysis of Common Vulnerability Scoring System (CVSS) values. This enables comparative analysis of vulnerability impact across different products or vendors over time, providing valuable metrics for procurement decisions and risk management (e.g., observing the shift in CVSS median for Java after its acquisition by Oracle).
  • Community-Driven Development: Emphasizing its open-source nature, cve-search actively encourages community contributions, from bug fixes and security updates to new data sources and feature enhancements, fostering a collaborative development environment.

Technical Deep Dive

▶ Watch: Blacklisting and whitelisting specific CPEs (20:00)

The architecture of cve-search is designed for modularity, flexibility, and efficient data handling, primarily built using Python 3. At its core, the system relies on a few key components:

The central element for data collection is the db_updater Python script. This script is responsible for fetching vulnerability information from various sources at regular intervals. Its modular design allows for easy expansion; users can create small Python modules to integrate new data feeds (e.g., specific vendor advisories like Oracle's). The db_updater also handles notifications for the indexer, facilitating full-text indexing of the collected data.

For persistent storage, cve-search utilizes a MongoDB database. MongoDB, a NoSQL document database, is chosen for its flexibility in storing diverse and evolving vulnerability documents, such as CVE records, vendor-specific advisories (e.g., Microsoft information), and other related metadata. This allows for a schema-less approach, adapting well to the often inconsistent formats of vulnerability data.

To ensure rapid data retrieval, especially for the web interface and API, an additional caching layer is implemented using Redis. Redis, an in-memory data structure store, provides exceptionally fast lookups, significantly improving the responsiveness of the application when browsing or searching for specific vendors or products.

Data Sources and Their Significance:

  • NIST National Vulnerability Database (NVD): The primary and foundational source of CVE information, providing standardized vulnerability identifiers and descriptions.
  • Common Platform Enumeration (CPE): A standardized nomenclature for IT systems, software, and packages. CPE entries, such as cpe:/a:joomla:joomla, are crucial for precisely identifying affected software versions. The talk highlights that CPE 2.2 and 2.3 are supported, with each entry describing elements like vendor, product, version, update, and language. Critically, only the vendor, product, and version are required, which can sometimes lead to less precise vulnerability definitions.
  • Common Weakness Enumeration (CWE): A community-developed list of common software and hardware weakness types, offering a higher-level classification of vulnerabilities.
  • Common Attack Pattern Enumeration and Classification (CAPEC): A comprehensive dictionary of known attack patterns, linking vulnerabilities to potential exploitation methods.
  • Official Vendor Statements: These provide crucial context, offering vendors' official positions on disclosed vulnerabilities, including whether a fix is planned or if the issue is acknowledged.
  • Microsoft Bulletins: Cross-references to Microsoft Security Bulletin IDs (MS values) are included, bridging different vulnerability identification schemes.
  • d2sec Exploitation References: Data from this vulnerability framework provides links to known exploits, enriching the practical relevance of CVE entries.
  • vFeed Data Feed: An external contribution that offers additional cross-references and links to various security resources, including Red Hat advisories and exploit databases like Metasploit, further enhancing the exploitability context of CVEs.

Command-Line Tools and Scripting:

cve-search is designed to be highly scriptable, providing various command-line utilities that output in JSON format:

  • db_updater -i: Used for the initial import and indexing of the entire NVD database, which can span over 16 years of data.
  • cve-search -p "cpe:/a:joomla:joomla": Searches for all CVEs associated with a specific CPE name, such as Joomla.
  • cve-search -c <CVE_ID>: Retrieves detailed information for a specific CVE ID, outputting a JSON object containing all associated metadata, including vulnerable configurations.
  • jq Integration: The JSON output is designed to be easily parsed by jq, a lightweight and flexible command-line JSON processor. This enables complex queries, such as extracting the top 10 vendors associated with "unknown" vulnerability descriptions, providing insights into vendor disclosure practices.
  • dumplast: A utility to dump the latest security advisories, which can be filtered by internal ranking to prioritize relevant vulnerabilities for an organization.
  • Bots: Integration with Jabber/XMPP and IRC allows users to query the database directly from chat platforms.
  • ASCII Doctor: A tool to convert CVE information into AsciiDoc format, which can then be rendered into professional-looking PDFs for corporate reporting.

Challenges with CPE Naming:

The speakers highlight significant challenges associated with CPE naming conventions. A major issue is the inconsistency between CPE names and the actual package names used in various operating systems or libraries. For example, OpenSSL might be referred to as libssl in Debian, making it difficult to automatically match vulnerabilities to installed software. Furthermore, vendors often backport fixes to older versions without updating CPEs, or they may use generic CPEs when a vulnerability only affects a specific platform (e.g., Flash on Linux but not Windows), complicating automated vulnerability correlation. The talk issues a call to vendors to provide clearer mapping databases between CPE values and real-world library/OS names.

Common Vulnerability Scoring System (CVSS):

cve-search utilizes CVSS values, which quantify the severity of vulnerabilities. CVSS scores are calculated based on various metrics, including the vulnerability's impact (confidentiality, integrity, availability – the CIA triad) and exploitability (e.g., network vs. local exploitation, complexity). This allows for statistical analysis, such as comparing the median CVSS scores for different software products or vendors, providing a quantitative measure of risk. For instance, the talk references the interesting trend where Sun Java had a median CVSS of 7.5, which increased to 10 for Oracle Java after the acquisition, indicating a shift in the perceived impact or ease of exploitation.

Web Interface and API:

The web interface offers a visual representation of CVEs, using colors (black for normal, gray for seen, purple for blacklisted, red for whitelisted) to help users manage their review process. The blacklisting feature, which supports regex-based CPE matching, allows organizations to exclude vulnerabilities for software they do not use (e.g., Android applications), while whitelisting highlights critical CVEs. The RESTful JSON API, publicly available, enables external tools to browse vendors, products, retrieve specific CVEs, and translate between CPE versions, making cve-search a powerful backend for other security applications.

Demo / Proof of Concept

▶ Watch: Dual-use nature: cve-search for good or bad (24:00)

While the presentation did not feature a live, interactive demo in the traditional sense, Dulaunoy and Moreels provided several compelling demonstrations of cve-search's functionality through command-line examples and screenshots of the web interface. These examples effectively illustrated how users can leverage the tool for practical vulnerability research and management.

One of the initial demonstrations involved searching for CVEs related to specific software using its CPE name. For instance, the command cve-search -p "cpe:/a:joomla:joomla" was shown to retrieve all matching CVEs for the Joomla CMS, showcasing the tool's ability to quickly identify vulnerabilities associated with a given product. Following this, the speakers demonstrated how to obtain detailed information for a specific CVE by using cve-search -c <CVE_ID>, which outputs a comprehensive JSON object containing all relevant data, including affected versions and cross-references.

A more advanced demonstration highlighted the power of combining cve-search with Unix-like tools for analytical purposes. By piping the JSON output through jq, users could extract specific fields, such as the vulnerable_configuration entries, and then process them further using cut, sort, uniq -c, and head to identify trends. An example of this was identifying the top vendors that frequently use the term "unknown" in their vulnerability descriptions, revealing insights into vendor disclosure practices. Oracle, for instance, was prominently featured in this analysis, suggesting a tendency to use generic descriptions, which could imply less precise vulnerability management or a deliberate strategy to delay detailed disclosure.

The presentation also included a demonstration of using CVSS values for statistical analysis. By extracting CVSS scores for specific products or vendors, users can compare the impact levels of vulnerabilities. The speakers illustrated this by comparing the median CVSS scores of Sun Java (7.5) and Oracle Java (10) after Oracle's acquisition of Sun, highlighting how cve-search can provide metrics for evaluating vendor security postures or comparing competing software.

For internal vulnerability management, the concept of ranking was demonstrated. Users can define custom tags and assign ranks to CVEs based on their relevance to specific organizational assets (e.g., tagging SAP vulnerabilities as "accounting" with a high rank). The dumplast tool was then shown to filter the latest advisories, displaying only those with a defined internal ranking, thus helping IT staff prioritize patches for critical systems.

Finally, the web interface was showcased through screenshots, illustrating its visual filtering capabilities. The color-coded display (black for normal, gray for seen, purple for blacklisted, red for whitelisted) provided a clear visual cue for vulnerability status. The blacklisting functionality was demonstrated with an example of excluding all Android application vulnerabilities if an organization does not use Android devices, effectively reducing noise and focusing attention on relevant threats. These demonstrations collectively underscored cve-search's practical utility for both individual security researchers and large enterprises.

Defensive Implications

▶ Watch: Expanding to pre-CVE vulnerabilities and management (34:00)

The cve-search project offers a powerful suite of capabilities that significantly enhance an organization's defensive posture against cyber threats. Its core value lies in transforming raw, disparate vulnerability data into actionable intelligence, empowering defenders to make informed decisions and streamline their security operations.

Firstly, the ability to maintain a local, offline vulnerability database is a critical advantage. This eliminates reliance on internet connectivity for urgent lookups, ensuring that vulnerability assessments can proceed unimpeded even in isolated environments or during network outages. More importantly, it addresses privacy concerns by keeping sensitive search queries internal, preventing the inadvertent disclosure of an organization's software inventory to third-party services.

The flexible data structure and comprehensive data aggregation from sources like NIST NVD, CPE, CWE, CAPEC, vFeed, and vendor statements mean that defenders have a richer, more contextualized view of each vulnerability. This enables a deeper understanding of the nature of a flaw, its potential exploitability, and its relationship to known attack patterns, moving beyond mere CVE IDs to a more holistic threat intelligence.

Customizable localization and classification through internal ranking is a game-changer for vulnerability prioritization. Organizations can tailor cve-search to their unique asset inventory and risk profile. By tagging and ranking CVEs relevant to specific departments (e.g., "accounting" for SAP systems) or critical infrastructure, security teams can filter out irrelevant noise and focus resources on vulnerabilities that pose the highest risk to their specific operational context. This directly supports a risk-based approach to patching and mitigation. The dumplast tool, when combined with ranking, allows for the efficient dissemination of prioritized vulnerability alerts to relevant IT teams, ensuring timely action.

The web interface's blacklisting and whitelisting features further refine this prioritization. Defenders can proactively exclude vulnerabilities for software not present in their environment (e.g., blacklisting Android vulnerabilities if the organization uses only iOS), drastically reducing the volume of alerts and allowing security personnel to concentrate on actual threats. Conversely, whitelisting can highlight critical CVEs that demand immediate attention.

Statistical analysis using CVSS scores provides a quantitative basis for risk assessment and procurement decisions. Security leaders can evaluate the historical vulnerability trends and impact scores of different software products or vendors. This data can inform strategic purchasing, allowing organizations to choose software with a lower historical risk profile or to negotiate better security assurances from vendors with a history of high-impact vulnerabilities. The observation of increased CVSS scores for Java post-Oracle acquisition serves as a powerful example of such analytical insight.

Looking ahead, the planned integration with tools like cve-scan (which correlates Nmap scans with applicable CVEs) and a dedicated management tool (for automated ticketing and team assignment) promises to transform vulnerability management from a reactive, manual process into a proactive, automated workflow. This would allow new CVEs to automatically generate tickets for responsible teams, significantly reducing response times and improving overall patch compliance.

Finally, the project's broader advocacy for open data sources and consistent CPE naming conventions directly benefits defenders. By pushing vendors to provide easily parseable and well-mapped vulnerability data, cve-search aims to reduce the manual effort currently required to integrate diverse vendor advisories, ultimately making the entire security ecosystem more transparent and manageable for everyone. This collaborative approach fosters a collective defense against emerging threats.

Key Takeaways

  • Local, Offline Vulnerability Management: cve-search provides a free, open-source Python 3 tool for collecting, searching, and analyzing CVEs locally, eliminating reliance on remote, potentially slow, and privacy-compromising online services.
  • Comprehensive Data Aggregation: It aggregates vulnerability information from multiple sources including NIST NVD, CPE, CWE, CAPEC, vendor statements, Microsoft Bulletins, d2sec, and vFeed, stored in MongoDB with Redis for caching, offering a holistic view of vulnerabilities.
  • Flexible and Scriptable with Unix-like Tools: The tool offers a modular architecture and outputs data in JSON format, making it highly compatible with Unix-like tools (e.g., jq) for advanced scripting, custom analysis, and integration into existing security workflows.
  • Contextualized Risk Assessment: Features like internal ranking, blacklisting, and whitelisting allow organizations to customize vulnerability relevance, prioritize threats based on their specific assets, and filter out irrelevant information, enhancing focused defensive efforts.
  • Analytical and Strategic Insights: cve-search enables statistical analysis of CVSS scores to compare vendor security postures and product vulnerability trends, providing valuable data for procurement decisions and long-term risk management strategies.
  • Advocacy for Open Data Standards: The project actively highlights the challenges of inconsistent vendor vulnerability disclosure and problematic CPE naming conventions, advocating for more transparent, parseable, and standardized data feeds across the security industry.

About the Speaker(s)

Alexandre Dulaunoy is one of the primary creators of cve-search. His motivation for starting the project stemmed from personal frustrations with the lack of adequate tools for offline vulnerability assessment and the reliance on remote, US-based vulnerability databases. Alexandre is responsible for maintaining the stable versions of cve-search. He also mentioned involvement in a research project called "toing," which focused on analyzing the vulnerability levels of end-users on Tor exit nodes, highlighting his background in practical security research.

Pieter-Jan Moreels significantly contributed to the development of cve-search, particularly focusing on modifications to the project's website and maintaining the unstable development versions. He is actively working on extending the cve-search ecosystem with new tools such as cve-scan, designed to correlate Nmap scan results with applicable CVEs, and a management tool aimed at automating vulnerability management workflows by creating tickets for responsible teams when new CVEs are identified. His contributions underscore a commitment to enhancing the practical utility and automation capabilities of vulnerability management.

Reviews

→ Top-rated talks at BruCON 0x07

All talks from BruCON 0x07