APIVerve.API.CVELookup 1.2.7

Prefix Reserved
dotnet add package APIVerve.API.CVELookup --version 1.2.7
                    
NuGet\Install-Package APIVerve.API.CVELookup -Version 1.2.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="APIVerve.API.CVELookup" Version="1.2.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="APIVerve.API.CVELookup" Version="1.2.7" />
                    
Directory.Packages.props
<PackageReference Include="APIVerve.API.CVELookup" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add APIVerve.API.CVELookup --version 1.2.7
                    
#r "nuget: APIVerve.API.CVELookup, 1.2.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package APIVerve.API.CVELookup@1.2.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=APIVerve.API.CVELookup&version=1.2.7
                    
Install as a Cake Addin
#tool nuget:?package=APIVerve.API.CVELookup&version=1.2.7
                    
Install as a Cake Tool

CVE Lookup API

CVE Lookup returns a vulnerability by its CVE id: description, status, dates, severity, CVSS score, CWE weaknesses and whether it is known to be exploited (CISA KEV). Search by product or vendor, filtered by severity or year. Paid plans add every CVSS vector (4.0, 3.1, 3.0, 2.0), affected products with version ranges, references, KEV due dates and ransomware use, and the EPSS exploit probability. Data is refreshed weekly, so a CVE can be up to a week behind NVD.

NuGet version

This is a .NET wrapper for the CVE Lookup API


Installation

Using the .NET CLI:

dotnet add package APIVerve.API.CVELookup

Using the Package Manager:

nuget install APIVerve.API.CVELookup

Using the Package Manager Console:

Install-Package APIVerve.API.CVELookup

From within Visual Studio:

  1. Open the Solution Explorer
  2. Right-click on a project within your solution
  3. Click on Manage NuGet Packages
  4. Click on the Browse tab and search for "APIVerve.API.CVELookup"
  5. Click on the APIVerve.API.CVELookup package, select the appropriate version in the right-tab and click Install

Configuration

Before using the CVE Lookup API client, you have to setup your account and obtain your API Key. You can get it by signing up at https://apiverve.com


Quick Start

Here's a simple example to get you started quickly:

using System;
using APIVerve.API.CVELookup;

class Program
{
    static async Task Main(string[] args)
    {
        // Initialize the API client
        var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

        var queryOptions = new CVELookupQueryOptions {
            Cve = "CVE-2021-44228",
            Product = "log4j",
            Vendor = "apache",
            Severity = "critical",
            Year = 2024,
            Exploited = true,
            Limit = 10,
            Page = 1
        };

        // Make the API call
        try
        {
            var response = await apiClient.ExecuteAsync(queryOptions);

            if (response.Error != null)
            {
                Console.WriteLine($"API Error: {response.Error}");
            }
            else
            {
                Console.WriteLine("Success!");
                // Access response data using the strongly-typed ResponseObj properties
                Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Exception: {ex.Message}");
        }
    }
}

Usage

The CVE Lookup API documentation is found here: https://docs.apiverve.com/ref/cvelookup. You can find parameters, example responses, and status codes documented here.

Setup

Authentication

CVE Lookup API uses API Key-based authentication. When you create an instance of the API client, you can pass your API Key as a parameter.

// Create an instance of the API client
var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

Usage Examples

The modern async/await pattern provides the best performance and code readability:

using System;
using System.Threading.Tasks;
using APIVerve.API.CVELookup;

public class Example
{
    public static async Task Main(string[] args)
    {
        var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

        var queryOptions = new CVELookupQueryOptions {
            Cve = "CVE-2021-44228",
            Product = "log4j",
            Vendor = "apache",
            Severity = "critical",
            Year = 2024,
            Exploited = true,
            Limit = 10,
            Page = 1
        };

        var response = await apiClient.ExecuteAsync(queryOptions);

        if (response.Error != null)
        {
            Console.WriteLine($"Error: {response.Error}");
        }
        else
        {
            Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
        }
    }
}

Synchronous Usage

If you need to use synchronous code, you can use the Execute method:

using System;
using APIVerve.API.CVELookup;

public class Example
{
    public static void Main(string[] args)
    {
        var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

        var queryOptions = new CVELookupQueryOptions {
            Cve = "CVE-2021-44228",
            Product = "log4j",
            Vendor = "apache",
            Severity = "critical",
            Year = 2024,
            Exploited = true,
            Limit = 10,
            Page = 1
        };

        var response = apiClient.Execute(queryOptions);

        if (response.Error != null)
        {
            Console.WriteLine($"Error: {response.Error}");
        }
        else
        {
            Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
        }
    }
}

Error Handling

The API client provides comprehensive error handling. Here are some examples:

Handling API Errors

using System;
using System.Threading.Tasks;
using APIVerve.API.CVELookup;

public class Example
{
    public static async Task Main(string[] args)
    {
        var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

        var queryOptions = new CVELookupQueryOptions {
            Cve = "CVE-2021-44228",
            Product = "log4j",
            Vendor = "apache",
            Severity = "critical",
            Year = 2024,
            Exploited = true,
            Limit = 10,
            Page = 1
        };

        try
        {
            var response = await apiClient.ExecuteAsync(queryOptions);

            // Check for API-level errors
            if (response.Error != null)
            {
                Console.WriteLine($"API Error: {response.Error}");
                Console.WriteLine($"Status: {response.Status}");
                return;
            }

            // Success - use the data
            Console.WriteLine("Request successful!");
            Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
        }
        catch (ArgumentException ex)
        {
            // Invalid API key or parameters
            Console.WriteLine($"Invalid argument: {ex.Message}");
        }
        catch (System.Net.Http.HttpRequestException ex)
        {
            // Network or HTTP errors
            Console.WriteLine($"Network error: {ex.Message}");
        }
        catch (Exception ex)
        {
            // Other errors
            Console.WriteLine($"Unexpected error: {ex.Message}");
        }
    }
}

Comprehensive Error Handling with Retry Logic

using System;
using System.Threading.Tasks;
using APIVerve.API.CVELookup;

public class Example
{
    public static async Task Main(string[] args)
    {
        var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

        // Configure retry behavior (max 3 retries)
        apiClient.SetMaxRetries(3);        // Retry up to 3 times (default: 0, max: 3)
        apiClient.SetRetryDelay(2000);     // Wait 2 seconds between retries

        var queryOptions = new CVELookupQueryOptions {
            Cve = "CVE-2021-44228",
            Product = "log4j",
            Vendor = "apache",
            Severity = "critical",
            Year = 2024,
            Exploited = true,
            Limit = 10,
            Page = 1
        };

        try
        {
            var response = await apiClient.ExecuteAsync(queryOptions);

            if (response.Error != null)
            {
                Console.WriteLine($"API Error: {response.Error}");
            }
            else
            {
                Console.WriteLine("Success!");
                Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Failed after retries: {ex.Message}");
        }
    }
}

Advanced Features

Custom Headers

Add custom headers to your requests:

var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

// Add custom headers
apiClient.AddCustomHeader("X-Custom-Header", "custom-value");
apiClient.AddCustomHeader("X-Request-ID", Guid.NewGuid().ToString());

var queryOptions = new CVELookupQueryOptions {
    Cve = "CVE-2021-44228",
    Product = "log4j",
    Vendor = "apache",
    Severity = "critical",
    Year = 2024,
    Exploited = true,
    Limit = 10,
    Page = 1
};

var response = await apiClient.ExecuteAsync(queryOptions);

// Remove a header
apiClient.RemoveCustomHeader("X-Custom-Header");

// Clear all custom headers
apiClient.ClearCustomHeaders();

Request Logging

Enable logging for debugging:

var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]", isDebug: true);

// Or use a custom logger
apiClient.SetLogger(message =>
{
    Console.WriteLine($"[LOG] {DateTime.Now:yyyy-MM-dd HH:mm:ss} - {message}");
});

var queryOptions = new CVELookupQueryOptions {
    Cve = "CVE-2021-44228",
    Product = "log4j",
    Vendor = "apache",
    Severity = "critical",
    Year = 2024,
    Exploited = true,
    Limit = 10,
    Page = 1
};

var response = await apiClient.ExecuteAsync(queryOptions);

Retry Configuration

Customize retry behavior for failed requests:

var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]");

// Set retry options
apiClient.SetMaxRetries(3);           // Retry up to 3 times (default: 0, max: 3)
apiClient.SetRetryDelay(1500);        // Wait 1.5 seconds between retries (default: 1000ms)

var queryOptions = new CVELookupQueryOptions {
    Cve = "CVE-2021-44228",
    Product = "log4j",
    Vendor = "apache",
    Severity = "critical",
    Year = 2024,
    Exploited = true,
    Limit = 10,
    Page = 1
};

var response = await apiClient.ExecuteAsync(queryOptions);

Dispose Pattern

The API client implements IDisposable for proper resource cleanup:

var queryOptions = new CVELookupQueryOptions {
    Cve = "CVE-2021-44228",
    Product = "log4j",
    Vendor = "apache",
    Severity = "critical",
    Year = 2024,
    Exploited = true,
    Limit = 10,
    Page = 1
};

using (var apiClient = new CVELookupAPIClient("[YOUR_API_KEY]"))
{
    var response = await apiClient.ExecuteAsync(queryOptions);
    Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(response, Newtonsoft.Json.Formatting.Indented));
}
// HttpClient is automatically disposed here

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "cveId": "CVE-2021-44228",
    "status": "Analyzed",
    "published": "2021-12-10T10:15:09",
    "lastModified": "2026-08-11T19:33:44",
    "description": "Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.",
    "severity": "critical",
    "cvssScore": 10,
    "cvssVersion": "3.1",
    "cwes": [
      "CWE-20",
      "CWE-400",
      "CWE-502",
      "CWE-917"
    ],
    "exploited": true,
    "cvss": {
      "v31": {
        "score": 10,
        "severity": "critical",
        "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H",
        "source": "nvd",
        "exploitabilityScore": 3.9,
        "impactScore": 6
      },
      "v2": {
        "score": 9.3,
        "severity": "high",
        "vector": "AV:N/AC:M/Au:N/C:C/I:C/A:C",
        "source": "nvd",
        "exploitabilityScore": 8.6,
        "impactScore": 10
      }
    },
    "kev": {
      "name": "Apache Log4j2 Remote Code Execution Vulnerability",
      "dateAdded": "2021-12-10",
      "dueDate": "2021-12-24",
      "requiredAction": "For all affected software assets for which updates exist, the only acceptable remediation actions are: 1) Apply updates; OR 2) remove affected assets from agency networks. Temporary mitigations using one of the measures provided at https://www.cisa.gov/uscert/ed-22-02-apache-log4j-recommended-mitigation-measures are only acceptable until updates are available.",
      "knownRansomwareUse": true
    },
    "epss": {
      "score": 0.99999,
      "percentile": 1,
      "date": "2026-11-28"
    },
    "products": [
      {
        "vendor": "apache",
        "product": "log4j",
        "type": "application",
        "versions": [
          {
            "startIncluding": "2.0.1",
            "endExcluding": "2.3.1"
          },
          {
            "startIncluding": "2.4.0",
            "endExcluding": "2.12.2"
          },
          {
            "startIncluding": "2.13.0",
            "endExcluding": "2.15.0"
          },
          {
            "version": "2.0",
            "update": "beta9"
          }
        ]
      },
      {
        "vendor": "siemens",
        "product": "6bk1602-0aa12-0tp0_firmware",
        "type": "os",
        "versions": [
          {
            "endExcluding": "2.7.0"
          }
        ]
      }
    ],
    "productCount": 143,
    "affected": [
      {
        "vendor": "Apache Software Foundation",
        "product": "Apache Log4j2",
        "versions": [
          {
            "version": "2.0-beta9",
            "lessThan": "log4j-core*"
          }
        ]
      }
    ],
    "references": [
      {
        "url": "http://packetstormsecurity.com/files/165225/Apache-Log4j2-2.14.1-Remote-Code-Execution.html",
        "tags": [
          "Third Party Advisory",
          "VDB Entry"
        ]
      },
      {
        "url": "http://packetstormsecurity.com/files/165260/VMware-Security-Advisory-2021-0028.html",
        "tags": [
          "Third Party Advisory",
          "VDB Entry"
        ]
      },
      {
        "url": "http://packetstormsecurity.com/files/165261/Apache-Log4j2-2.14.1-Information-Disclosure.html",
        "tags": [
          "Exploit",
          "Third Party Advisory",
          "VDB Entry"
        ]
      }
    ],
    "referenceCount": 103,
    "assigner": "security@apache.org",
    "dataAsOf": {
      "nvd": "2026-11-28",
      "kev": "2026-11-27",
      "epss": "2026-11-28"
    }
  }
}

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the MIT License (MIT)

Copyright (©) 2026 APIVerve, and EvlarSoft LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net20 is compatible.  net35 is compatible.  net40 is compatible.  net403 was computed.  net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.7 61 11/30/2026

CVE Lookup API client for .NET, version 1.2.7. Features include async/await support, automatic retries, custom headers, request logging, and cancellation token support.