NodeJS/browserify-sign/4.2.0


adds node crypto signing for browsers

https://www.npmjs.com/package/browserify-sign
ISC

1 Security Vulnerabilities

browserify-sign upper bound check issue in `dsaVerify` leads to a signature forgery attack

Published date: 2023-10-26T20:53:21Z
CVE: CVE-2023-46234
Links:

Summary

An upper bound check issue in dsaVerify function allows an attacker to construct signatures that can be successfully verified by any public key, thus leading to a signature forgery attack.

Details

In dsaVerify function, it checks whether the value of the signature is legal by calling function checkValue, namely, whether r and s are both in the interval [1, q - 1]. However, the second line of the checkValue function wrongly checks the upper bound of the passed parameters, since the value of b.cmp(q) can only be 0, 1 and -1, and it can never be greater than q.

In this way, although the values of s cannot be 0, an attacker can achieve the same effect as zero by setting its value to q, and then send (r, s) = (1, q) to pass the verification of any public key.

Impact

All places in this project that involve DSA verification of user-input signatures will be affected by this vulnerability.

Fix PR:

Since the temporary private fork was deleted, here's a webarchive of the PR discussion and diff pages: PR webarchive.zip

Affected versions: ["2.6.0", "2.6.1", "2.7.0", "2.7.1", "2.7.2", "2.7.3", "2.7.4", "2.7.5", "2.8.0", "3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.0.8", "4.0.0", "4.0.1", "4.0.2", "4.0.3", "4.0.4", "4.1.0", "4.2.0", "4.2.1"]
Secure versions: [2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.5.1, 2.5.2, 4.2.2, 4.2.3]
Recommendation: Update to version 4.2.3.

32 Other Versions

Version License Security Released
4.2.3 ISC 2024-03-05 - 17:36 about 2 months
4.2.2 ISC 2023-10-25 - 15:23 6 months
4.2.1 ISC 1 2020-08-04 - 16:15 over 3 years
4.2.0 ISC 1 2020-05-18 - 15:20 almost 4 years
4.1.0 ISC 1 2020-05-05 - 12:54 almost 4 years
4.0.4 ISC 1 2017-03-28 - 12:06 about 7 years
4.0.3 ISC 1 2017-03-27 - 19:08 about 7 years
4.0.2 ISC 1 2017-03-27 - 19:02 about 7 years
4.0.1 ISC 1 2017-03-27 - 18:06 about 7 years
4.0.0 ISC 1 2015-11-02 - 14:20 over 8 years
3.0.8 ISC 1 2015-09-05 - 14:55 over 8 years
3.0.3 ISC 1 2015-08-07 - 19:12 over 8 years
3.0.2 ISC 1 2015-05-21 - 02:57 almost 9 years
3.0.1 ISC 1 2015-03-11 - 12:49 about 9 years
3.0.0 ISC 1 2015-03-10 - 12:00 about 9 years
2.8.0 ISC 1 2015-01-12 - 13:57 over 9 years
2.7.5 ISC 1 2015-01-06 - 13:04 over 9 years
2.7.4 ISC 1 2015-01-06 - 12:53 over 9 years
2.7.3 ISC 1 2015-01-06 - 12:45 over 9 years
2.7.2 ISC 1 2015-01-05 - 16:07 over 9 years
2.7.1 ISC 1 2015-01-03 - 13:53 over 9 years
2.7.0 ISC 1 2014-12-22 - 19:43 over 9 years
2.6.1 ISC 1 2014-12-19 - 16:39 over 9 years
2.6.0 ISC 1 2014-12-18 - 21:59 over 9 years
2.5.2 ISC 2014-12-17 - 12:32 over 9 years
2.5.1 ISC 2014-12-09 - 21:29 over 9 years
2.5.0 ISC 2014-11-25 - 19:56 over 9 years
2.4.0 ISC 2014-11-16 - 16:28 over 9 years
2.3.0 ISC 2014-11-15 - 23:39 over 9 years
2.2.0 ISC 2014-11-15 - 21:54 over 9 years
2.1.0 ISC 2014-11-15 - 20:09 over 9 years
2.0.0 ISC 2014-11-15 - 18:34 over 9 years