Description
Versions of the package jsrsasign from 7.0.0 and before 11.1.1 are vulnerable to Incomplete Comparison with Missing Factors via the getRandomBigIntegerZeroToMax and getRandomBigIntegerMinToMax functions in src/crypto-1.1.js; an attacker can recover the private key by exploiting the incorrect compareTo checks that accept out-of-range candidates and thus bias DSA nonces during signature generation.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | jsrsasign | 7.0.0 – < 11.1.1 | 11.1.1 |
| — | org.webjars.npm:jsrsasign | 8.0.12 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | jsrsasign | >= 7.0.0, < 11.1.1 | 11.1.1 | GHSA-5jx8-q4cp-rhh6 |
References
- https://security.snyk.io/vuln/SNYK-JS-JSRSASIGN-15370939
- https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-15812264
- https://gist.github.com/Kr0emer/081681818b51605c91945126d74b4f20
- https://github.com/kjur/jsrsasign/pull/647
- https://github.com/kjur/jsrsasign/commit/ee4b013478366cb16cea9a4bdfb218b6077f83b1