{"schemaVersion":3,"id":"CVE-2026-22698","aliases":["GHSA-w3g8-fp6j-wvqw"],"status":"published","duplicateOf":null,"title":null,"description":"RustCrypto: Elliptic Curves is general purpose Elliptic Curve Cryptography (ECC) support, including types and traits for representing various elliptic curve forms, scalars, points, and public/secret keys composed thereof. In versions 0.14.0-pre.0 and 0.14.0-rc.0, a  critical vulnerability exists in the SM2 Public Key Encryption (PKE) implementation where the ephemeral nonce k is generated with severely reduced entropy. A unit mismatch error causes the nonce generation function to request only 32 bits of randomness instead of the expected 256 bits. This reduces the security of the encryption from a 128-bit level to a trivial 16-bit level, allowing a practical attack to recover the nonce k and decrypt any ciphertext given only the public key and ciphertext. This issue has been patched via commit e4f7778.","dates":{"published":"2026-01-10T05:17:19.993Z","modified":"2026-01-12T16:48:30.706Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.7,"severity":"high","version":"4.0","versionLabel":"v4.0","source":"CVE.org","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Crates.io","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00274,"percentile":0.18737,"severity":"low","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0.005999999999999972,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.00268},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00274,"percentile":0.18737}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00268,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.00274,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.00274,"percentile":0.18737}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_RUSTCRYPTO_ELLIPTIC-CURVES","name":"Elliptic Curves","source":"github","url":"https://github.com/RustCrypto/elliptic-curves/security/advisories/GHSA-w3g8-fp6j-wvqw","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-331","name":"Insufficient Entropy","description":"The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/331.html"}],"affected":[{"vendor":"Crates.Io","product":"sm2","name":"sm2","label":"sm2","ecosystem":"Crates.Io","cpePart":null,"purl":"pkg:cargo/sm2","purlType":"cargo","versions":[{"text":"≥ 0.14.0-pre.0, ≤ 0.14.0-rc.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.14.0-pre.0, ≤ 0.14.0-rc.4","eol":null,"hubHref":null},{"vendor":"rustcrypto","product":"elliptic-curves","name":"elliptic-curves","label":"elliptic-curves","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"= 0.14.0-pre.0","noFixRecorded":false,"fixedIn":null},{"text":"= 0.14.0-rc.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"= 0.14.0-pre.0 | = 0.14.0-rc.0","eol":null,"hubHref":"/vendor/rustcrypto/elliptic-curves"},{"vendor":"rustcrypto","product":"sm2_elliptic_curve","name":"sm2 elliptic curve","label":"sm2_elliptic_curve","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"0.14.0:pre0","noFixRecorded":false,"fixedIn":null},{"text":"0.14.0:rc0","noFixRecorded":false,"fixedIn":null}],"versionsText":"0.14.0:pre0 | 0.14.0:rc0","eol":null,"hubHref":"/vendor/rustcrypto/sm2_elliptic_curve"}],"affectedCount":3,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/RustCrypto/elliptic-curves/security/advisories/GHSA-w3g8-fp6j-wvqw","label":"github.com/RustCrypto/elliptic-curves/security/advisories/GHSA-w3g8-fp6j-wvqw","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Exploit","Mitigation","Vendor Advisory"]},{"url":"https://github.com/RustCrypto/elliptic-curves/pull/1600","label":"github.com/RustCrypto/elliptic-curves/pull/1600","hostname":"github.com","tags":["X Refsource MISC","WEB","Issue Tracking","Patch"]},{"url":"https://github.com/RustCrypto/elliptic-curves/commit/4781762f23ff22ab34763410f648128055c93731","label":"github.com/RustCrypto/elliptic-curves/commit/4781762f23ff22ab34763410f648128055c93731","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch"]},{"url":"https://github.com/RustCrypto/elliptic-curves/commit/e4f77788130d065d760e57fb109370827110a525","label":"github.com/RustCrypto/elliptic-curves/commit/e4f77788130d065d760e57fb109370827110a525","hostname":"github.com","tags":["X Refsource MISC","WEB","Patch"]},{"url":"https://crates.io/crates/sm2/0.14.0-pre.0","label":"crates.io/crates/sm2/0.14.0-pre.0","hostname":"crates.io","tags":["X Refsource MISC","WEB","Release Notes"]},{"url":"https://crates.io/crates/sm2/0.14.0-rc.0","label":"crates.io/crates/sm2/0.14.0-rc.0","hostname":"crates.io","tags":["X Refsource MISC","WEB","Release Notes"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22698","label":"nvd.nist.gov/vuln/detail/CVE-2026-22698","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/RustCrypto/elliptic-curves","label":"github.com/RustCrypto/elliptic-curves","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-01-10T05:17:19.993Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-01-12T16:48:30.706Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":45,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T21:36:36.331Z","stale":false,"partial":false}}