{"id":"CVE-2021-3798","aliases":["AZL-10659","EUVD-2021-27058","GHSA-f2gp-jqv6-cmxg","RHBA-2021:3054","UBUNTU-CVE-2021-3798"],"status":"published","title":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is...","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.00285,"percentile":0.21172,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-200","CWE-295"],"published":"2022-08-23T15:48:58Z","modified":"2026-10-20T14:12:44Z","fixes":[{"ecosystem":"Azure Linux:2","package":"opencryptoki","fixed_in":["3.17.0-1"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ccatok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ccatok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-debugsource","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ep11tok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ep11tok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icatok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icatok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icsftok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icsftok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-libs","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-libs-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-swtok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-swtok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-tpmtok","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-tpmtok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-ccatok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-debugsource","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-devel","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-ep11tok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-icatok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-icsftok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-libs-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-swtok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]},{"ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-tpmtok-debuginfo","fixed_in":["0:3.15.1-6.el8_4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:2","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.17.0-1"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ccatok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ccatok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ep11tok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-ep11tok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icatok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icatok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icsftok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-icsftok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-libs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-libs-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-swtok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-swtok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-tpmtok","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opencryptoki-tpmtok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-ccatok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-devel","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-ep11tok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-icatok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-icsftok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-libs-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-swtok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::crb","package":"opencryptoki-tpmtok-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:3.15.1-6.el8_4"}]}]},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.3.1+dfsg-3ubuntu5","3.4.1+dfsg-1ubuntu1","3.4.1+dfsg-1ubuntu2","3.4.1+dfsg-1ubuntu3","3.4.1+dfsg-1ubuntu4","3.4.1+dfsg-1ubuntu4.1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.7.0+dfsg-4","3.8.1+dfsg-2","3.8.1+dfsg-3","3.8.2+dfsg-0ubuntu1","3.9.0+dfsg-0ubuntu1","3.9.0+dfsg-0ubuntu1.1","3.9.0+dfsg-0ubuntu1.2","3.9.0+dfsg-0ubuntu1.3","3.9.0+dfsg-0ubuntu1.4"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.11.1+dfsg-0ubuntu2","3.11.1+dfsg-0ubuntu3","3.12.1+dfsg-0ubuntu1","3.13.0+dfsg-0ubuntu4","3.13.0+dfsg-0ubuntu5","3.13.0+dfsg-0ubuntu5.1","3.13.0+dfsg-0ubuntu5.2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.16.0+dfsg-0ubuntu1","3.16.0+dfsg-0ubuntu2","3.16.0+dfsg-0ubuntu3","3.17.0+dfsg+20220202.b40982e-0ubuntu1","3.17.0+dfsg+20220202.b40982e-0ubuntu1.1","3.17.0+dfsg+20220202.b40982e-0ubuntu1.2","3.17.0+dfsg+20220202.b40982e-0ubuntu1.3"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.21.0+dfsg-0ubuntu1","3.21.0+dfsg-0ubuntu2","3.22.0+dfsg-0ubuntu1","3.23.0+dfsg-0ubuntu1","3.23.0+dfsg-0ubuntu2","3.23.0+dfsg-0ubuntu3","3.23.0+dfsg-0ubuntu3.1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.24.0+git20250128.0462717+dfsg-0ubuntu1","3.25.0+dfsg-0ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.26.0+dfsg-0ubuntu1","3.27.0+dfsg-0ubuntu1","3.27.0+dfsg-0ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"opencryptoki","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.25.0+dfsg-0ubuntu1","3.26.0+dfsg-0ubuntu1","3.26.0+dfsg-0ubuntu1.1"]}],"products":[{"vendor":"opencryptoki","product":"opencryptoki"},{"vendor":"opencryptoki_project","product":"opencryptoki"}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=1990591","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Third Party Advisory","fix","report"]},{"url":"https://access.redhat.com/security/cve/CVE-2021-3798","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory","report"]},{"url":"https://github.com/opencryptoki/opencryptoki/pull/402","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-3798","tags":["web","advisory"]},{"url":"https://access.redhat.com/errata/RHBA-2021:3054","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-f2gp-jqv6-cmxg"},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2021/rhba-2021_3054.json","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-3798","tags":["advisory","report"]},{"url":"https://ubuntu.com/security/CVE-2021-3798","tags":["report"]},{"url":"https://bugs.launchpad.net/ubuntu/+source/opencryptoki/+bug/1928780","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2021-3798","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T15:48:58Z","modified":"2024-08-03T17:09:09.595Z","cwes":["CWE-200"],"updated_at":"2026-11-02T14:33:03.671751Z"}],"euvd":[{"id":"EUVD-2021-27058","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T15:48:58Z","modified":"2024-08-03T17:09:09Z","updated_at":"2026-11-03T03:25:11.376657Z"}],"ghsa":[{"id":"GHSA-f2gp-jqv6-cmxg","title":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is...","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-24T00:00:29Z","modified":"2023-02-13T00:30:51Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-200","CWE-295"],"updated_at":"2026-11-02T14:54:04.926808Z"}],"nvd":[{"id":"CVE-2021-3798","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T16:15:09.93Z","modified":"2026-06-17T04:05:47.383Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-200"],"updated_at":"2026-11-02T14:07:06.906968Z"}],"osv":[{"id":"AZL-10659","title":"CVE-2021-3798 affecting package opencryptoki for versions less than 3.17.0-1","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T16:15:09Z","modified":"2026-04-21T04:21:19.82425Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:28:01.408755Z"},{"id":"CVE-2021-3798","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T16:15:09.93Z","modified":"2026-10-20T14:12:44.465005971Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:20.434873Z"},{"id":"RHBA-2021:3054","title":"Red Hat Bug Fix Advisory: opencryptoki bug fix and enhancement update","status":"published","published":"2024-09-16T06:08:53Z","modified":"2026-06-26T12:22:16.982918191Z","cvss":[{"version":"3.1","score":5.1,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:52:58.636919Z"},{"id":"UBUNTU-CVE-2021-3798","description":"A flaw was found in openCryptoki. The openCryptoki Soft token does not check if an EC key is valid when an EC key is created via C_CreateObject, nor when C_DeriveKey is used with ECDH public data. This may allow a malicious user to extract the private key by performing an invalid curve attack.","status":"published","published":"2022-08-23T16:15:00Z","modified":"2026-10-17T12:57:13.667643367Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:54:28.526929Z"}]}}
