Skip to main content

National Vulnerability Database CPE/CVE API Library

Project description

NVDLib

Simple NIST NVD API wrapper library

License Written Documentation Status

NVDlib allows you to interface with the NIST National Vulnerability Database and pull vulnerabilities (CVEs) and Common Platform Enumeration (CPEs) into easily accessible objects.

Features

  • Search the NVD for CVEs using all parameters allowed by the NVD API. Including search criteria such as CVE publish and modification date, keywords, severity, score, or CPE name.
  • Search CPE names by keywords, CPE match strings, or modification dates. Then pull the CVE ID's that are relevant to those CPEs.
  • Retrieve details on individual CVEs, their relevant CPE names, and more.

Install

$ pip install nvdlib

Demo

>>> import nvdlib

# Perform the search with the known cpeName
>>> cves = nvdlib.searchCVE(cpeName='cpe:2.3:a:apache:tomcat:7.0.67:*:*:*:*:*:*:*', limit = 5)

# Pull CVE ID, score, and CVSS version of the score from the object.
>>> for eachCVE in cves:
>>>     print(eachCVE.id + ' - ' + eachCVE.score[0] + ' - ' + eachCVE.score[1])

CVE-2021-30640 - 6.5 - V3
CVE-2019-12418 - 7.0 - V3
CVE-2020-1938 - 9.8 - V3
CVE-2021-25329 - 7.0 - V3
CVE-2021-24122 - 5.9 - V3

Documentation

https://nvdlib.com

More information

This is my first attempt at creating a library while utilizing all my Python experience from classes to functions.

For more information on the NIST NVD API for CPE and CVEs, see the documentation here: https://nvd.nist.gov/General/News/New-NVD-CVE-CPE-API-and-SOAP-Retirement

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvdlib-0.5.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file nvdlib-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: nvdlib-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for nvdlib-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d806b29b99dd78bf1ee1f6de8c7d2b6272bb72245c406e186560ccff2f97c07a
MD5 5996ce3cbd579c589cb7e449119f7dc8
BLAKE2b-256 fb4d1d4b2664defef5bb4232b7568203d176c012e568ba78ae3e06137528665b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page