{"id":37095134,"url":"https://github.com/hiroakis/go-cve-dictionary","last_synced_at":"2026-01-14T11:43:44.721Z","repository":{"id":57582924,"uuid":"58510468","full_name":"hiroakis/go-cve-dictionary","owner":"hiroakis","description":"Build a local copy of CVE (NVD and Japanese JVN). Server mode for easy querying.","archived":false,"fork":true,"pushed_at":"2016-05-11T03:15:20.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T14:22:46.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"vulsio/go-cve-dictionary","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiroakis.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}},"created_at":"2016-05-11T03:10:24.000Z","updated_at":"2021-09-15T23:14:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hiroakis/go-cve-dictionary","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hiroakis/go-cve-dictionary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroakis%2Fgo-cve-dictionary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroakis%2Fgo-cve-dictionary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroakis%2Fgo-cve-dictionary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroakis%2Fgo-cve-dictionary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiroakis","download_url":"https://codeload.github.com/hiroakis/go-cve-dictionary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiroakis%2Fgo-cve-dictionary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-14T11:43:44.229Z","updated_at":"2026-01-14T11:43:44.714Z","avatar_url":"https://github.com/hiroakis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-cve-dictionary\n\nThis is tool to build a local copy of the NVD (National Vulnerabilities Database) [1]\nand the Japanese JVN [2], which contain security vulnerabilities according to their\nCVE identifiers [3] including exhaustive information and a risk score. The local\ncopy is generated in sqlite format, and the tool has a server mode for easy querying.\n\n[1] https://en.wikipedia.org/wiki/National_Vulnerability_Database  \n[2] https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures  \n[3] http://jvndb.jvn.jp/apis/termsofuse.html  \n\n## Install requirements\n\ngo-cve-dictionary requires the following packages.\n\n- sqlite\n- git\n- gcc\n- go v1.6\n    - https://golang.org/doc/install\n\n```bash\n$ ssh ec2-user@52.100.100.100  -i ~/.ssh/private.pem\n$ sudo yum -y install sqlite git gcc\n$ wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz\n$ sudo tar -C /usr/local -xzf go1.6.linux-amd64.tar.gz\n$ mkdir $HOME/go\n```\nPut these lines into /etc/profile.d/goenv.sh\n\n```bash\nexport GOROOT=/usr/local/go\nexport GOPATH=$HOME/go\nexport PATH=$PATH:$GOROOT/bin:$GOPATH/bin\n```\n\nSet the OS environment variable to current shell\n```bash\n$ source /etc/profile.d/goenv.sh\n```\n\n## Deploy go-cve-dictionary\n\nTo install, use `go get`:\n\ngo get\n\n```bash\n$ sudo mkdir /var/log/vuls\n$ sudo chown ec2-user /var/log/vuls\n$ sudo chmod 700 /var/log/vuls\n$ go get github.com/kotakanbe/go-cve-dictionary\n```\n\nFetch Vulnerability data from NVD.  \nIt takes about 10 minutes (on AWS).  \n\n```bash\n$ for i in {2002..2016}; do ./go-cve-dictionary fetchnvd -years $i; done\n... snip ...\n$ ls -alh cve.sqlite3\n-rw-r--r-- 1 ec2-user ec2-user 7.0M Mar 24 13:20 cve.sqlite3\n```\n\nNow we have vulnerability data.  \nStart go-cve-dictionary as server mode.  \n```bash\n$ go-cve-dictionary server\n[Mar 24 15:21:55]  INFO Opening DB. datafile: /home/ec2-user/cve.sqlite3\n[Mar 24 15:21:55]  INFO Migrating DB\n[Mar 24 15:21:56]  INFO Starting HTTP Sever...\n[Mar 24 15:21:56]  INFO Listening on 127.0.0.1:1323\n```\n\n# Hello HeartBleed\n\n```\n$ curl http://127.0.0.1:1323/cves/CVE-2014-0160 | jq \".\" \n{\n  \"ID\": 63949,\n  \"CreatedAt\": \"2016-03-23T20:50:52.712279635+09:00\",\n  \"UpdatedAt\": \"2016-03-23T20:50:52.712279635+09:00\",\n  \"DeletedAt\": null,\n  \"CveInfoID\": 0,\n  \"CveID\": \"CVE-2014-0160\",\n  \"Nvd\": {\n    \"ID\": 63949,\n    \"CreatedAt\": \"2016-03-23T20:50:52.712384527+09:00\",\n    \"UpdatedAt\": \"2016-03-23T20:50:52.712384527+09:00\",\n    \"DeletedAt\": null,\n    \"CveDetailID\": 63949,\n    \"Summary\": \"The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packets, which allows remote attackers to obtain sensitive information from process memory via crafted packets that trigger a buffer over-read, as demonstrated by reading private keys, related to d1_both.c and t1_lib.c, aka the Heartbleed bug.\",\n    \"Score\": 5,\n    \"AccessVector\": \"NETWORK\",\n    \"AccessComplexity\": \"LOW\",\n    \"Authentication\": \"NONE\",\n    \"ConfidentialityImpact\": \"PARTIAL\",\n    \"IntegrityImpact\": \"NONE\",\n    \"AvailabilityImpact\": \"NONE\",\n    \"Cpes\": null,\n    \"References\": [\n      {\n        \"ID\": 316262,\n        \"CreatedAt\": \"2016-03-23T20:50:52.715120529+09:00\",\n        \"UpdatedAt\": \"2016-03-23T20:50:52.715120529+09:00\",\n        \"DeletedAt\": null,\n        \"JvnID\": 0,\n        \"NvdID\": 63949,\n        \"Source\": \"CERT\",\n        \"Link\": \"http://www.us-cert.gov/ncas/alerts/TA14-098A\"\n      },\n      ...snip...\n    ],\n    \"PublishedDate\": \"2014-04-07T18:55:03.893-04:00\",\n    \"LastModifiedDate\": \"2015-10-22T10:19:38.453-04:00\"\n  },\n  \"Jvn\": {\n    \"ID\": 651,\n    \"CreatedAt\": \"2016-03-23T20:53:47.711776398+09:00\",\n    \"UpdatedAt\": \"2016-03-23T20:53:47.711776398+09:00\",\n    \"DeletedAt\": null,\n    \"CveDetailID\": 63949,\n    \"Title\": \"OpenSSL の heartbeat 拡張に情報漏えいの脆弱性\",\n    \"Summary\": \"OpenSSL の heartbeat 拡張の実装には、情報漏えいの脆弱性が存在します。TLS や DTLS 通信において OpenSSL のコードを実行しているプロセスのメモリ内容が通信相手に漏えいする可能性があります。\",\n    \"JvnLink\": \"http://jvndb.jvn.jp/ja/contents/2014/JVNDB-2014-001920.html\",\n    \"JvnID\": \"JVNDB-2014-001920\",\n    \"Score\": 5,\n    \"Severity\": \"Medium\",\n    \"Vector\": \"(AV:N/AC:L/Au:N/C:P/I:N/A:N)\",\n    \"References\": [\n      {\n        \"ID\": 369475,\n        \"CreatedAt\": \"2016-03-23T20:53:47.711885901+09:00\",\n        \"UpdatedAt\": \"2016-03-23T20:53:47.711885901+09:00\",\n        \"DeletedAt\": null,\n        \"JvnID\": 651,\n        \"NvdID\": 0,\n        \"Source\": \"AT-POLICE\",\n        \"Link\": \"http://www.npa.go.jp/cyberpolice/detect/pdf/20140410.pdf\"\n      },\n      ...snip...\n    ],\n    \"Cpes\": null,\n    \"PublishedDate\": \"2014-04-08T16:13:59+09:00\",\n    \"LastModifiedDate\": \"2014-04-08T16:13:59+09:00\"\n  }\n}\n\n```\n\n# Hello Ruby on Rails 4.0.2\n\n```\n$ curl -v -H \"Accept: application/json\" -H \"Content-type: application/json\" -X POST -d '{\"name\": \"cpe:/a:rubyonrails:ruby_on_rails:4.0.2:-\"}' http://localhost:1323/cpes | jq \".\"\n[\n  {\n    \"ID\": 345,\n    \"CreatedAt\": \"2016-04-10T10:52:26.196610454+09:00\",\n    \"UpdatedAt\": \"2016-04-10T10:52:26.196610454+09:00\",\n    \"DeletedAt\": null,\n    \"CveInfoID\": 0,\n    \"CveID\": \"CVE-2016-0751\",\n    \"Nvd\": {\n      \"ID\": 345,\n      \"CreatedAt\": \"2016-04-10T10:52:26.196853826+09:00\",\n      \"UpdatedAt\": \"2016-04-10T10:52:26.196853826+09:00\",\n      \"DeletedAt\": null,\n      \"CveDetailID\": 345,\n      \"Summary\": \"actionpack/lib/action_dispatch/http/mime_type.rb in Action Pack in Ruby on Rails before 3.2.22.1, 4.0.x and 4.1.x before 4.1.14.1, 4.2.x before 4.2.5.1, and 5.x before 5.0.0.beta1.1 does not properly restrict use of the MIME type cache, which allows remote attackers to cause a denial of service (memory consumption) via a crafted HTTP Accept header.\",\n      \"Score\": 5,\n      \"AccessVector\": \"NETWORK\",\n      \"AccessComplexity\": \"LOW\",\n      \"Authentication\": \"NONE\",\n      \"ConfidentialityImpact\": \"NONE\",\n      \"IntegrityImpact\": \"NONE\",\n      \"AvailabilityImpact\": \"PARTIAL\",\n      \"Cpes\": null,\n      \"References\": [\n        {\n          \"ID\": 486,\n          \"CreatedAt\": \"2016-04-10T10:52:26.217958168+09:00\",\n          \"UpdatedAt\": \"2016-04-10T10:52:26.217958168+09:00\",\n          \"DeletedAt\": null,\n          \"JvnID\": 0,\n          \"NvdID\": 345,\n          \"Source\": \"MLIST\",\n          \"Link\": \"https://groups.google.com/forum/message/raw?msg=ruby-security-ann/9oLY_FCzvoc/5CDXbvpYEgAJ\"\n        },\n        {\n          \"ID\": 487,\n          \"CreatedAt\": \"2016-04-10T10:52:26.218175571+09:00\",\n          \"UpdatedAt\": \"2016-04-10T10:52:26.218175571+09:00\",\n          \"DeletedAt\": null,\n          \"JvnID\": 0,\n          \"NvdID\": 345,\n          \"Source\": \"MLIST\",\n          \"Link\": \"http://www.openwall.com/lists/oss-security/2016/01/25/9\"\n        }\n      ],\n      \"PublishedDate\": \"2016-02-15T21:59:05.877-05:00\",\n      \"LastModifiedDate\": \"2016-03-18T21:02:43.817-04:00\"\n    },\n    \"Jvn\": {\n      \"ID\": 0,\n      \"CreatedAt\": \"0001-01-01T00:00:00Z\",\n      \"UpdatedAt\": \"0001-01-01T00:00:00Z\",\n      \"DeletedAt\": null,\n      \"CveDetailID\": 0,\n      \"Title\": \"\",\n      \"Summary\": \"\",\n      \"JvnLink\": \"\",\n      \"JvnID\": \"\",\n      \"Score\": 0,\n      \"Severity\": \"\",\n      \"Vector\": \"\",\n      \"References\": null,\n      \"Cpes\": null,\n      \"PublishedDate\": \"0001-01-01T00:00:00Z\",\n      \"LastModifiedDate\": \"0001-01-01T00:00:00Z\"\n    }\n  },\n  ... snip ...\n]\n```\n\n# Usage:\n\n```\n$ go-cve-dictionary -help\nUsage: go-cve-dictionary \u003cflags\u003e \u003csubcommand\u003e \u003csubcommand args\u003e\n\nSubcommands:\n        commands         list all command names\n        flags            describe all known top-level flags\n        help             describe subcommands and their syntax\n\nSubcommands for fetchjvn:\n        fetchjvn         Fetch Vulnerability dictionary from JVN\n\nSubcommands for fetchnvd:\n        fetchnvd         Fetch Vulnerability dictionary from NVD\n\nSubcommands for loadjvn:\n        loadjvn          Start CVE dictionary HTTP server\n\nSubcommands for server:\n        server           Start CVE dictionary HTTP server\n\n\nUse \"go-cve-dictionary flags\" for a list of top-level flags\n```\n\ngo-cve-dictionary has four subcommands\n- fetchnvd  \n  Fetch vulnerbility data from NVD(English)\n\n- fetchjvn\n  Fetch vulnerbility data from JVN(Japanese)\n\n- loadjvn\n  Load vulnerbility data from local json file(Japanese)\n\n- server\n  Start HTTP server\n\n# Usage: Fetch NVD Data.\n\n```\n$ ./go-cve-dictionary fetchnvd -help\nfetchnvd:\n        fetchnvd\n                [-last2y]\n                [-years] 2015 2016 ...\n                [-dbpath=/path/to/cve.sqlite3]\n                [-http-proxy=http://192.168.0.1:8080]\n                [-debug]\n                [-debug-sql]\n\nFor the first time, run the blow command to fetch data for entire period. (It takes about 10 minutes)\n   $ for i in {2002..2016}; do go-cve-dictionary fetchnvd -years $i ; done\n\n  -dbpath string\n        /path/to/sqlite3 (default \"$PWD/cve.sqlite3\")\n  -debug\n        debug mode\n  -debug-sql\n        SQL debug mode\n  -http-proxy string\n        http://proxy-url:port (default: empty)\n  -last2y\n        Refresh NVD data in the last two years.\n  -years\n        Refresh NVD data of specific years.\n```\n\n- Fetch data in the last two years\n\n```\n$ go-cve-dictionary fetchnvd -last2y\n```\n\n- Fetch data of specific years\n\n```\n$ go-cve-dictionary fetchnvd -years 2002 2003 2016\n```\n\n- Fetch NVD data for entire period.\n```\nfor i in {2002..2016}; do ./go-cve-dictionary fetchnvd -years $i; done\n\n```\n\n\n----\n\n# Usage: Fetch JVN Data.\n\n```\n$ go-cve-dictionary fetchjvn -h\nfetchjvn:\n        fetchjvn\n                [-dump-path=/path/to/cve.json]\n                [-dbpath=$PWD/cve.sqlite3]\n                [-week]\n                [-month]\n                [-entire]\n                [-http-proxy=http://192.168.0.1:8080]\n                [-debug]\n                [-debug-sql]\n\n  -dbpath string\n        /path/to/sqlite3 (default \"$PWD/cve.sqlite3\")\n  -debug\n        debug mode\n  -debug-sql\n        SQL debug mode\n  -dump-path string\n        /path/to/cve.json (default: empty(nodump))\n  -entire\n        Fetch data for entire period.(This operation is time-consuming) (default: false)\n  -http-proxy string\n        http://proxy-url:port (default: empty)\n  -month\n        Fetch data in the last month\n  -week\n        Fetch data in the last week\n\n```\n\n- Fetch data for entire period\n\n```\n$ go-cve-dictionary fetchjvn --entire\n```\n\n- Fetch data in the last month\n\n```\n$ go-cve-dictionary fetchnjvn -month\n```\n\n- Fetch data in the last week\n\n```\n$ go-cve-dictionary fetchjvn -week\n```\n\n----\n\n# Usage: Run HTTP Server.\n\n```\n$ go-cve-dictionary server -h\nserver:\n        server\n                [-bind=127.0.0.1]\n                [-port=8000]\n                [-dbpath=$PWD/cve.sqlite3]\n                [-debug]\n                [-debug-sql]\n\n  -bind string\n        HTTP server bind to IP address (default: loop back interface) (default \"127.0.0.1\")\n  -dbpath string\n        /path/to/sqlite3 (default : $PWD/cve.sqlite3) \n  -debug\n        debug mode (default: false)\n  -debug-sql\n        SQL debug mode (default: false)\n  -port string\n        HTTP server port number (default: 1323) (default \"1323\")\n\n```\n\n----\n\n# Misc\n\n- HTTP Proxy Support  \nIf your system is behind HTTP proxy, you have to specify --http-proxy option.\n\n- How to Daemonize go-cve-dictionary  \nUse Systemd, Upstart or supervisord, daemontools...\n\n- How to update vulnerbility data automatically.  \nUse job scheduler like Cron (with -last2y option).\n\n- How to cross compile\n    ```bash\n    $ cd /path/to/your/local-git-reporsitory/go-cve-dictionary\n    $ GOOS=linux GOARCH=amd64 go build -o cvedict.amd64\n    ```\n\n- Logging  \nLog wrote to under /var/log/vuls/\n\n- Debug  \nRun with --debug, --sql-debug option.\n\n----\n\n# Data Source\n\n- [NVD](https://nvd.nist.gov/)\n- [JVN(Japanese)](http://jvndb.jvn.jp/apis/myjvn/)\n\n\n\n----\n\n# Authors\n\nkotakanbe ([@kotakanbe](https://twitter.com/kotakanbe)) created go-cve-dictionary and [these fine people](https://github.com/future-architect/go-cve-dictionary/graphs/contributors) have contributed.\n\n----\n\n# Contribute\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n----\n\n# Change Log\n\nPlease see [CHANGELOG](https://github.com/kotakanbe/go-cve-dictionary/blob/master/CHANGELOG.md).\n\n----\n\n# Licence\n\nPlease see [LICENSE](https://github.com/kotakanbe/go-cve-dictionary/blob/master/LICENSE).\n\n----\n\n# Additional License\n\n- [NVD](https://nvd.nist.gov/faq)\n\u003eHow can my organization use the NVD data within our own products and services?  \n\u003e All NVD data is freely available from our XML Data Feeds. There are no fees, licensing restrictions, or even a requirement to register. All NIST publications are available in the public domain according to Title 17 of the United States Code. Acknowledgment of the NVD  when using our information is appreciated. In addition, please email nvd@nist.gov to let us know how the information is being used.  \n \n\n- [JVN](http://jvndb.jvn.jp/apis/termsofuse.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroakis%2Fgo-cve-dictionary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiroakis%2Fgo-cve-dictionary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroakis%2Fgo-cve-dictionary/lists"}