{"id":"CVE-2021-3798","details":"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.","modified":"2026-04-02T07:09:05.897128Z","published":"2022-08-23T16:15:09.930Z","references":[{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2021-3798"},{"type":"FIX","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1990591"},{"type":"FIX","url":"https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0"},{"type":"FIX","url":"https://github.com/opencryptoki/opencryptoki/pull/402"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/opencryptoki/opencryptoki","events":[{"introduced":"0"},{"fixed":"8ab1059bd29b28dbeeae151310cc9beca88d1cb1"},{"fixed":"4e3b43c3d8844402c04a66b55c6c940f965109f0"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"3.17.0"}]}}],"versions":["v2.3.2","v2.3.3","v2.4.2","v2.4.3","v2.4.3.1","v3.0","v3.1","v3.10.0","v3.11.0","v3.11.1","v3.12.0","v3.12.1","v3.13.0","v3.14.0","v3.15.0","v3.15.1","v3.16.0","v3.2","v3.3","v3.4","v3.4.1","v3.5","v3.6","v3.6.1","v3.6.2","v3.7.0","v3.8.0","v3.8.1","v3.8.2","v3.9.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-3798.json","vanir_signatures":[{"signature_type":"Function","deprecated":false,"id":"CVE-2021-3798-a513978c","target":{"function":"fill_ec_key_from_privkey","file":"usr/lib/soft_stdll/soft_specific.c"},"source":"https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0","digest":{"length":744,"function_hash":"227030742641434579281486111687377295738"},"signature_version":"v1"},{"signature_type":"Function","deprecated":false,"id":"CVE-2021-3798-bd9a54be","target":{"function":"fill_ec_key_from_pubkey","file":"usr/lib/soft_stdll/soft_specific.c"},"source":"https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0","digest":{"length":572,"function_hash":"167809855859216864502066761829954412651"},"signature_version":"v1"},{"signature_type":"Line","deprecated":false,"id":"CVE-2021-3798-e4f487ff","target":{"file":"usr/lib/soft_stdll/soft_specific.c"},"source":"https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0","digest":{"threshold":0.9,"line_hashes":["241914080668320224096387584555820029697","294749349881809309464343043695379726799","155825835143266065778361583573477398571","241914080668320224096387584555820029697","151463854885936926283904390379390757917","273130886101318911504810936600417370356"]},"signature_version":"v1"}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"}]}