{"id":13510866,"url":"https://github.com/cve-search/cve-search","last_synced_at":"2025-05-14T00:07:55.016Z","repository":{"id":3205979,"uuid":"4239855","full_name":"cve-search/cve-search","owner":"cve-search","description":"cve-search - a tool to perform local searches for known vulnerabilities","archived":false,"fork":false,"pushed_at":"2025-03-28T19:02:58.000Z","size":16007,"stargazers_count":2433,"open_issues_count":8,"forks_count":604,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-22T06:44:11.365Z","etag":null,"topics":["common-vulnerabilities","cpe","cve","cve-databases","cve-entries","cve-scanning","cve-search","vulnerabilities","vulnerability-assessment","vulnerability-detection"],"latest_commit_sha":null,"homepage":"https://www.cve-search.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cve-search.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-05-06T10:22:54.000Z","updated_at":"2025-04-20T22:42:37.000Z","dependencies_parsed_at":"2023-10-10T17:59:39.887Z","dependency_job_id":"d315cdf6-eccf-4172-aebd-82b98dddf0b4","html_url":"https://github.com/cve-search/cve-search","commit_stats":{"total_commits":1791,"total_committers":74,"mean_commits":24.2027027027027,"dds":0.689000558347292,"last_synced_commit":"2120bb066a130dc94175d14e02cbc0385b4c0815"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cve-search%2Fcve-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cve-search%2Fcve-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cve-search%2Fcve-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cve-search%2Fcve-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cve-search","download_url":"https://codeload.github.com/cve-search/cve-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043874,"owners_count":22005028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["common-vulnerabilities","cpe","cve","cve-databases","cve-entries","cve-scanning","cve-search","vulnerabilities","vulnerability-assessment","vulnerability-detection"],"created_at":"2024-08-01T02:01:57.144Z","updated_at":"2025-05-14T00:07:54.995Z","avatar_url":"https://github.com/cve-search.png","language":"Python","funding_links":[],"categories":["Python","\u003ca id=\"683b645c2162a1fce5f24ac2abfa1973\"\u003e\u003c/a\u003e漏洞\u0026\u0026漏洞管理\u0026\u0026漏洞发现/挖掘\u0026\u0026漏洞开发\u0026\u0026漏洞利用\u0026\u0026Fuzzing","Dependency intelligence","Automated Vulnerability Detection","Python (1887)","others","Tools"],"sub_categories":["\u003ca id=\"9f068ea97c2e8865fac21d6fc50f86b3\"\u003e\u003c/a\u003e漏洞管理","Vulnerability information exchange"],"readme":"# cve-search\n\n[![Join the chat at https://gitter.im/cve-search/cve-search](https://badges.gitter.im/cve-search/cve-search.svg)](https://gitter.im/cve-search/cve-search?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n![Build \u0026 Test](https://github.com/cve-search/cve-search/workflows/Build%20\u0026%20Test/badge.svg)\n![Black formatting](https://github.com/cve-search/cve-search/workflows/Black%20formatting/badge.svg)\n![CodeQL](https://github.com/cve-search/cve-search/workflows/CodeQL/badge.svg)\n\n![cve-search logo](https://avatars3.githubusercontent.com/u/15033728?v=3\u0026s=200)\n\ncve-search is a tool to import CVE (Common Vulnerabilities and Exposures) and\nCPE (Common Platform Enumeration) into a MongoDB to facilitate search\nand processing of CVEs.\n\nThe main objective of the software is to avoid doing direct and public lookups\ninto the public CVE databases. Local lookups are usually faster and you can\nlimit your sensitive queries via the Internet.\n\ncve-search includes a back-end to store vulnerabilities and related information,\nan intuitive web interface for search and managing vulnerabilities,\na series of tools to query the system and a web API interface.\n\ncve-search is used by many organizations including the [public CVE services of CIRCL](https://cvepremium.circl.lu/).\n\nThis document gives you basic information how to start with cve-search. For more\ninformation please refer to the documentation in the **_/doc_** folder of this\nproject.\n\n## Getting started\n\nCheck the [documentation](https://cve-search.github.io/cve-search/) to get you started\n\n## Usage\n\nYou can search the database using search.py.\n\n```text\nusage: search.py [-h] [-q Q] [-p P [P ...]] [--only-if-vulnerable] [--strict_vendor_product] [--lax] [-f F] [-c C] [-o O]\n                 [-l] [-n] [-r] [-a] [-v V] [-s S] [-t T] [-i I]\n\nSearch for vulnerabilities in the National Vulnerability DB. Data from http://nvd.nist.org.\n\noptions:\n  -h, --help            show this help message and exit\n  -p P [P ...]          P = search one or more products, e.g. o:microsoft:windows_7 or o:cisco:ios:12.1 or\n                        o:microsoft:windows_7 o:cisco:ios:12.1. Add --only-if-vulnerable if only vulnerabilities that\n                        directly affect the product are wanted.\n  --only-if-vulnerable  With this option, \"-p\" will only return vulnerabilities directly assigned to the product. I.e.\n                        it will not consider \"windows_7\" if it is only mentioned as affected OS in an adobe:reader\n                        vulnerability.\n  --strict_vendor_product\n                        With this option, a strict vendor product search is executed. The values in \"-p\" should be\n                        formatted as vendor:product, e.g. microsoft:windows_7\n  --lax                 Strict search for software version is disabled. Likely gives false positives for earlier\n                        versions that were not yet vulnerable. Note that version comparison for non-numeric values\n                        is done with simplifications.\n  -f F                  F = free text search in vulnerability summary\n  -c C                  search one or more CVE-ID\n  -o O                  O = output format [csv|html|json|xml|cveid]\n  -l                    sort in descending mode\n  -n                    lookup complete cpe (Common Platform Enumeration) name for vulnerable configuration\n  -r                    lookup ranking of vulnerable configuration\n  -a                    Lookup CAPEC for related CWE weaknesses\n  -v V                  vendor name to lookup in reference URLs\n  -s S                  search in summary text\n  -t T                  search in last n day (published)\n  -T T                  search in last n day (modified)\n  -i I                  Limit output to n elements (default: unlimited)\n  -q [Q]                Removed. Was used to search pip requirements file for CVEs.\n```\n\nExamples:\n\n```bash\n./bin/search.py -p cisco:ios:12.4\n./bin/search.py -p cisco:ios:12.4 -o json\n./bin/search.py -f nagios -n\n./bin/search.py -p microsoft:windows_7 -o html\n```\n\nIf you want to search all the WebEx vulnerabilities and only printing the official references from the supplier.\n\n```bash\n./bin/search.py -p webex: -o csv  -v \"cisco\"\n```\n\nYou can also dump the JSON for a specific CVE ID.\n\n```bash\n./bin/search.py -c CVE-2010-3333 -o json\n```\n\nOr dump the last 2 CVE entries in RSS or Atom format.\n\n```bash\n./bin/dump_last.py -f atom -l 2\n```\n\nOr you can use the webinterface.\n\n```bash\n./web/index.py\n```\n\n## Usage of the ranking database\n\nThere is a ranking database allowing to rank software vulnerabilities based on\ntheir common platform enumeration name. The ranking can be done per organization\nor department within your organization or any meaningful name for you.\n\nAs an example, you can add a partial CPE name like \"sap:netweaver\" which is very\ncritical for your accounting department.\n\n```bash\n./sbin/db_ranking.py  -c \"sap:netweaver\" -g \"accounting\" -r 3\n```\n\nand then you can lookup the ranking (-r option) for a specific CVE-ID:\n\n```bash\n./bin/search.py -c CVE-2012-4341  -r  -n\n```\n\n## Advanced usage\n\nAs cve-search is based on a set of tools, it can be used and combined with standard Unix tools. If you ever wonder what are the top vendors using the term \"unknown\" for their vulnerabilities:\n\n```bash\npython3 bin/search_fulltext.py -q unknown -f \\\n    | jq -c '. | .vulnerable_configuration[0]' \\\n    | cut -f5 -d: | sort  | uniq -c  | sort -nr | head -10\n\n1500 oracle\n381 sun\n372 hp\n232 google\n208 ibm\n126 mozilla\n103 microsoft\n100 adobe\n 78 apple\n 68 linux\n ```\n\nYou can compare CVSS (Common Vulnerability Scoring System ) values of some products based on their CPE name. Like comparing oracle:java versus sun:jre and using R to make some statistics about their CVSS values:\n\n```bash\npython3 bin/search.py -p oracle:java -o json \\\n  | jq -r '.cvss' | Rscript -e 'summary(as.numeric(read.table(file(\"stdin\"))[,1]))'\n\nMin. 1st Qu.  Median    Mean 3rd Qu.    Max.\n1.800   5.350   9.300   7.832  10.000  10.000\n```\n\n```bash\npython3 bin/search.py -p sun:jre -o json \\\n  | jq -r '.cvss' | Rscript -e 'summary(as.numeric(read.table(file(\"stdin\"))[,1]))'\n\nMin. 1st Qu.  Median    Mean 3rd Qu.    Max.\n0.000   5.000   7.500   7.333  10.000  10.000\n```\n\n## Fulltext indexing\n\nIf you want to index all the CVEs from your current MongoDB collection:\n\n```bash\n./sbin/db_fulltext.py -l 0\n```\n\nand you query the fulltext index (to get a list of matching CVE-ID):\n\n```bash\n./bin/search_fulltext.py -q NFS -q Linux\n```\n\nor to query the fulltext index and output the JSON object for each CVE-ID:\n\n```bash\n./bin/search_fulltext.py -q NFS -q Linux -f\n```\n\n## Fulltext visualization\n\nThe fulltext indexer visualization is using the fulltext indexes to build\na list of the most common keywords used in CVE. [NLTK](http://nltk.org/) is\nrequired to generate the keywords with the most common English\nstopwords and lemmatize the output. [NTLK for Python 3](http://nltk.org/nltk3-alpha/)\nexists but you need to use the alpha version of NLTK.\n\n```bash\n./bin/search_fulltext.py  -g -s \u003ecve.json\n```\n\n![cve-search visualization](https://farm9.staticflickr.com/8109/8603509755_c7690c2de4_n.jpg \"CVE Keywords Visualization Using Data From cve-search\")\n\nYou can see a visualization on the [demo site](http://www.foo.be/cve/).\n\n## Web interface\n\nThe web interface is a minimal interface to see the last CVE entries and\nquery a specific CVE. You'll need flask in order to run the website and\n[Flask-PyMongo](http://flask-pymongo.readthedocs.org/en/latest/). To start\nthe web interface:\n\n```bash\ncd ./web\n./index.py\n```\n\nThen you can connect on `http://127.0.0.1:5000/` to browser the last CVE.\n\n## Web API interface\n\nThe web interface includes a minimal JSON API to get CVE by ID, by vendor or product.\nA public version of the API is also accessible on [cve.circl.lu](https://cve.circl.lu/).\n\nList the know vendors in JSON\n\n```bash\ncurl \"http://127.0.0.1:5000/api/browse/\"\n```\n\nDump the product of a specific vendor in JSON\n\n```jq\ncurl \"http://127.0.0.1:5000/api/browse/zyxel\"\n{\n  \"product\": [\n    \"n300_netusb_nbg-419n\",\n    \"n300_netusb_nbg-419n_firmware\",\n    \"p-660h-61\",\n    \"p-660h-63\",\n    \"p-660h-67\",\n    \"p-660h-d1\",\n    \"p-660h-d3\",\n    \"p-660h-t1\",\n    \"p-660h-t3\",\n    \"p-660hw\",\n    \"p-660hw_d1\",\n    \"p-660hw_d3\",\n    \"p-660hw_t3\"\n  ],\n  \"vendor\": \"zyxel\"\n}\n```\n\nFind the associated vulnerabilities to a vendor and a product.\n\n```jq\ncurl \"http://127.0.0.1:5000/api/search/zyxel/p-660hw\" | jq .\n[\n  {\n    \"cwe\": \"CWE-352\",\n    \"references\": [\n      \"http://www.exploit-db.com/exploits/33518\",\n      \"http://secunia.com/advisories/58513\",\n      \"http://packetstormsecurity.com/files/126812/Zyxel-P-660HW-T1-Cross-Site-Request-Forgery.html\",\n      \"http://osvdb.org/show/osvdb/107449\"\n    ],\n    \"vulnerable_configuration\": [\n      \"cpe:/h:zyxel:p-660hw:_t1:v3\"\n    ],\n    \"Published\": \"2014-06-16T14:55:09.713-04:00\",\n    \"id\": \"CVE-2014-4162\",\n    \"Modified\": \"2014-07-17T01:07:29.683-04:00\",\n    \"cvss\": 6.8,\n    \"summary\": \"Multiple cross-site request forgery (CSRF) vulnerabilities in the Zyxel P-660HW-T1 (v3) wireless router allow remote attackers to hijack the authentication of administrators for requests that change the (1) wifi password or (2) SSID via a request to Forms/WLAN_General_1.\"\n  },\n  {\n    \"cwe\": \"CWE-20\",\n    \"references\": [\n      \"http://www.kb.cert.org/vuls/id/893726\"\n    ],\n    \"vulnerable_configuration\": [\n      \"cpe:/h:zyxel:p-660h-63:-\",\n      \"cpe:/h:zyxel:p-660h-t1:-\",\n      \"cpe:/h:zyxel:p-660h-d3:-\",\n      \"cpe:/h:zyxel:p-660h-t3:v2\",\n      \"cpe:/h:zyxel:p-660h-t1:v2\",\n      \"cpe:/h:zyxel:p-660h-d1:-\",\n      \"cpe:/h:zyxel:p-660h-67:-\",\n      \"cpe:/h:zyxel:p-660h-61:-\",\n      \"cpe:/h:zyxel:p-660hw_t3:v2\",\n      \"cpe:/h:zyxel:p-660hw_t3:-\",\n      \"cpe:/h:zyxel:p-660hw_d3:-\",\n      \"cpe:/h:zyxel:p-660hw_d1:v2\",\n      \"cpe:/h:zyxel:p-660hw_d1:-\",\n      \"cpe:/h:zyxel:p-660hw:_t1:v2\",\n      \"cpe:/h:zyxel:p-660hw:_t1:-\"\n    ],\n````\n\n## Software using cve-search\n\n* [MISP modules](http://misp.github.io/misp-modules/expansion/#cve) cve-search to interact with MISP\n* [MISP module cve-advanced](https://github.com/MISP/misp-modules/blob/master/misp_modules/modules/expansion/cve_advanced.py) to import complete CVE as MISP objects\n* [cve-portal](https://www.github.com/CIRCL/cve-portal) which is a CVE notification portal\n* [cve-search-mt](https://www.github.com/NorthernSec/cve-search-mt) which is a set of management tools for CVE-Search\n* [cve-scan](https://www.github.com/NorthernSec/cve-scan) which is a NMap CVE system scanner\n* [Mercator](https://www.github.com/dbarzin/mercator) which is an application that allow the mapping of an information system\n\n## Docker versions\n\nOfficial dockerized version of cve-search:\n\n[CVE-Search-Docker](https://github.com/cve-search/CVE-Search-Docker)\n\nThere are some unofficial dockerized versions of cve-search (which are not maintained by us):\n\n* [docker-cve-search](https://github.com/ttimasdf/docker-cve-search)\n* [cve-search-docker](https://github.com/leojcollard/cve-search-docker)\n\n## Changelog\n\nYou can find the changelog on [GitHub Releases](https://github.com/cve-search/cve-search/releases)\n([legacy changelog](https://www.cve-search.org/Changelog.txt)).\n\n## License\n\ncve-search is free software released under the \"GNU Affero General Public License v3.0\"\n\n```text\nCopyright (c) 2012 Wim Remes - https://github.com/wimremes/\nCopyright (c) 2012-2024 Alexandre Dulaunoy - https://github.com/adulau/\nCopyright (c) 2015-2019 Pieter-Jan Moreels - https://github.com/pidgeyl/\nCopyright (c) 2020-2024 Paul Tikken - https://github.com/P-T-I\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcve-search%2Fcve-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcve-search%2Fcve-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcve-search%2Fcve-search/lists"}