{"id":"CVE-2022-25898","aliases":["CVE-2022-25898","GHSA-3fvg-4v2m-98jf"],"related":[],"kind":"vulnerability","state":"published","title":"Improper Verification of Cryptographic Signature","summary":"The package jsrsasign before 10.5.25 are vulnerable to Improper Verification of Cryptographic Signature when JWS or JWT signature with non Base64URL encoding special characters or number escaped characters may be validated as valid by mistake. Workaround: Validate JWS or JWT signature if it has Base64URL and dot safe string before executing JWS.verify() or JWS.verifyJWT() method.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The package jsrsasign before 10.5.25 are vulnerable to Improper Verification of Cryptographic Signature when JWS or JWT signature with non Base64URL encoding special characters or number escaped characters may be validated as valid by mistake. Workaround: Validate JWS or JWT signature if it has Base64URL and dot safe string before executing JWS.verify() or JWS.verifyJWT() method.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nJsrsasign supports JWS(JSON Web Signatures) and JWT(JSON Web Token) validation. However JWS or JWT signature with non Base64URL encoding special characters or number escaped characters may be validated as valid by mistake.\n\nFor example, even if a string of non Base64URL encoding characters such as `!@$%` or `\\11` is inserted into a valid JWS or JWT signature value string, it will still be a valid JWS or JWT signature by mistake.\n\nWhen jsrsasign's JWS or JWT validation is used in OpenID connect or OAuth2, this vulnerability will affect to authentication or authorization.\n\nBy our internal assessment, CVSS 3.1 score will be 8.6.\nCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N\n\n### Patches\nUsers validate JWS or JWT signatures should upgrade to 10.5.25.\n\n### Workarounds\nValidate JWS or JWT signature if it has Base64URL and dot safe string before\nexecuting JWS.verify() or JWS.verifyJWT() method.\n\n### ACKNOWLEDGEMENT\n\nThanks to Adi Malyanker and Or David for this vulnerability report. Also thanks for [Snyk security team](https://snyk.io/) for this coordination.\n\n### References\nhttps://github.com/kjur/jsrsasign/releases/tag/10.5.25\nhttps://github.com/kjur/jsrsasign/security/advisories/GHSA-3fvg-4v2m-98jf kjur's advisories\nhttps://github.com/advisories/GHSA-3fvg-4v2m-98jf github advisories\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-25898\nhttps://kjur.github.io/jsrsasign/api/symbols/KJUR.jws.JWS.html#.verifyJWT\nhttps://kjur.github.io/jsrsasign/api/symbols/KJUR.jws.JWS.html#.verify\nhttps://kjur.github.io/jsrsasign/api/symbols/global__.html#.isBase64URLDot\nhttps://github.com/kjur/jsrsasign/wiki/Tutorial-for-JWS-verification\nhttps://github.com/kjur/jsrsasign/wiki/Tutorial-for-JWT-verification\nhttps://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-2869122","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete jsrsasign versiones anteriores a 10.5.25, es vulnerable a una Verificación Inapropiada de la Firma Criptográfica cuando la firma JWS o JWT con caracteres especiales de codificación no Base64URL o con caracteres de escape de número puede ser comprobada como válida por error. Mitigación: Comprobar la firma JWS o JWT si presenta Base64URL y cadena de puntos segura antes de ejecutar el método JWS.verify() o JWS.verifyJWT()","source":"nvd"}],"published":"2022-06-25T07:19:06.000Z","modified":"2026-06-22T03:18:31.867Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H/E:P","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:H/E:P","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N","score":8.6,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"10.5.25","status":"affected"}],"product":"jsrsasign","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.8.0","status":"affected","fixed":"10.5.25"}],"ecosystem":"npm","package":"jsrsasign","purl":"pkg:npm/jsrsasign","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.8.0","fixed":"10.5.25"}],"vendor":"kjur","product":"jsrsasign","cpe":"cpe:2.3:a:kjur:jsrsasign:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-JSRSASIGN-2869122","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-2935896","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBKJUR-2935897","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-2935898","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/kjur/jsrsasign/commit/4536a6e9e8bcf1a644ab7c07ed96e453347dae41","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/kjur/jsrsasign/releases/tag/10.5.25","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25898","tags":["advisory"],"sources":["ghsa"]},{"url":"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-25898","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/kjur/jsrsasign","tags":["package"],"sources":["ghsa"]}],"credits":["Adi Malyanker","Or David"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-25898","url":"https://www.cve.org/CVERecord?id=CVE-2022-25898","licence":"CVE Terms of Use","modified":"2024-09-16T18:48:35.777Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3fvg-4v2m-98jf","url":"https://github.com/advisories/GHSA-3fvg-4v2m-98jf","licence":"CC-BY-4.0","modified":"2025-01-14T10:57:26.432Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-25898","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25898","licence":"Public domain","modified":"2026-06-22T03:18:31.867Z"}],"updatedAt":"2026-11-25T22:58:12.679Z","epss":{"score":0.01171,"percentile":0.68333,"date":"2026-12-01T12:00:22.000Z"}}