{"id":"CVE-2026-23965","aliases":["CVE-2026-23965","GHSA-hpwg-xg7m-3p6m"],"related":[],"kind":"vulnerability","state":"published","title":"sm-crypto Affected by Signature Forgery in SM2-DSA","summary":"sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. A signature forgery vulnerability exists in the SM2 signature verification logic of sm-crypto prior to version 0.4.0. Under default configurations, an attacker can forge valid signatures for arbitrary public keys. If the message space contains sufficient redundancy, the attacker can fix the prefix of the message associated with the forged signature to satisfy specific formatting requirements. Version 0.4.0 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. A signature forgery vulnerability exists in the SM2 signature verification logic of sm-crypto prior to version 0.4.0. Under default configurations, an attacker can forge valid signatures for arbitrary public keys. If the message space contains sufficient redundancy, the attacker can fix the prefix of the message associated with the forged signature to satisfy specific formatting requirements. Version 0.4.0 patches the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA signature forgery vulnerability exists in the SM2 signature verification logic of sm-crypto. Under default configurations, an attacker can forge valid signatures for arbitrary public keys. If the message space contains sufficient redundancy, the attacker can fix the prefix of the message associated with the forged signature to satisfy specific formatting requirements.\n\n### Credit\n\nThis vulnerability was discovered by:\n- XlabAI Team of Tencent Xuanwu Lab\n- Atuin Automated Vulnerability Discovery Engine","format":"markdown","source":"ghsa"},{"lang":"es","text":"sm-crypto proporciona implementaciones de JavaScript de los algoritmos criptográficos chinos SM2, SM3 y SM4. Hay una vulnerabilidad de falsificación de firma en la lógica de verificación de firma SM2 de sm-crypto anterior a la versión 0.4.0. En configuraciones predeterminadas, un atacante puede falsificar firmas válidas para claves públicas arbitrarias. Si el espacio de mensajes contiene suficiente redundancia, el atacante puede fijar el prefijo del mensaje asociado con la firma falsificada para satisfacer requisitos de formato específicos. La versión 0.4.0 corrige el problema.","source":"nvd"}],"published":"2026-01-21T16:13:44.000Z","modified":"2026-06-17T10:22:21.983Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"version":"< 0.4.0","status":"affected"}],"vendor":"JuneAndGreen","product":"sm-crypto","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.4.0"}],"ecosystem":"npm","package":"sm-crypto","purl":"pkg:npm/sm-crypto","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.4.0"}],"vendor":"juneandgreen","product":"sm-crypto","cpe":"cpe:2.3:a:juneandgreen:sm-crypto:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/JuneAndGreen/sm-crypto/security/advisories/GHSA-hpwg-xg7m-3p6m","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/JuneAndGreen/sm-crypto/commit/85295a859d0766222d12ce2be3e6fce7b438b510","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23965","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/JuneAndGreen/sm-crypto","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-01-22T15:57:36.387Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23965","url":"https://www.cve.org/CVERecord?id=CVE-2026-23965","licence":"CVE Terms of Use","modified":"2026-01-22T15:58:10.585Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hpwg-xg7m-3p6m","url":"https://github.com/advisories/GHSA-hpwg-xg7m-3p6m","licence":"CC-BY-4.0","modified":"2026-02-03T03:10:18.521Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23965","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23965","licence":"Public domain","modified":"2026-06-17T10:22:21.983Z"}],"updatedAt":"2026-11-25T22:59:13.041Z","epss":{"score":0.00215,"percentile":0.12678,"date":"2026-12-01T12:00:22.000Z"}}