Skip to main content

CVEdb

PyPI version Tests Slack Status

CVEdb is yet another Python CVE database library and utility. There are lots already available. Why create another? Most existing libraries rely on a third party API like cve.circl.lu, which can and do throttle usage, require registration, and/or demand an internet connection. Some libraries are bloated, including web interfaces for search.

CVEdb Features:

  • Can be used either as a library or a command line utility
  • Simple API
  • Download directly from the National Vulnerability Database
  • Automatically, incrementally update at any time

CVEdb Anti-Features:

  • Does not require many dependencies
  • Does not have a web server
  • Does not require Internet connectivity other than to download new CVEs

Installation

$ pip3 install cvedb

Command Line Usage

$ cvedb --help

Python Examples

from cvedb.db import CVEdb

with CVEdb.open() as db:
    for cve in db:
        print(cve)

By default, the CVEs downloaded from NIST are saved to a sqlite database stored in cvedb.db.DEFAULT_DB_PATH, which is set to ~/.config/cvedb/cvedb.sqlite. This can be customized by passing the db_path argument to CVEdb.open.

The db.data() function returns an instance of a cvedb.feed.Data object, which has numerous methods to query CVEs. For example:

with CVEdb.open() as db:
    for cve in db.data().search("search term"):
        print(cve)

In addition to accepting strings, the data().search(...) function will accept any cvedb.search.SearchQuery object.

Known Issues

The NIST National Vulnerability Database is in the process of transitioning to a new REST API. The datasets on which CVEdb is built are still available, but it is unclear whether they may become deprecated. Also, NIST has started rate limiting downloads, which may affect CVEdb syncing. Therefore, CVEdb ships pre-seeded with a database. Therefore, CVEdb does not require any Internet connectivity after it is installed, other than to download new CVE definitions. Also, the behavior of CVEdb was changed from automatically checking for updates as necessary to now requiring the user explicitly request an update with the new --update argument. Support for the new REST API is being tracked in this GitHub issue.

License and Acknowledgements

CVEdb was created by Trail of Bits. It is licensed under the GNU Lesser General Public License v3.0. Contact us if you're looking for an exception to the terms. © 2021, Trail of Bits.

The CVE database shipped with CVEdb is created and maintained by NIST and is released in the public domain.

Metadata

Release files for cvedb 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvedb 0.0.5
File Size Uploaded
cvedb-0.0.5.tar.gz 45.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for cvedb 0.0.5
File Interpreter ABI Platform
cvedb-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 91.3 MB

Release files / cvedb-0.0.5.tar.gz

Download URL cvedb-0.0.5.tar.gz
Size 45.7 MB
Tags Source
SHA-256 checksum
How to use checksums
0f2568652fe81991aeb58ccf195c915975bf2150155293c06b12274e4dc81a19
BLAKE2b-256 checksum
How to use checksums
007f64d843646eaf2dd582cc60484eba0742e7804e3a6da0518273a36e7d3cc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release files / cvedb-0.0.5-py3-none-any.whl

Download URL cvedb-0.0.5-py3-none-any.whl
Size 45.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ba2e3b319bbb286b5a55456622e477238f68949725a172562ee33ce6074c52ca
BLAKE2b-256 checksum
How to use checksums
c6ffb4b50fd9ebafee9b4fd7773babee25e107626f60a751833914816e60208a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page