node-forge 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,79 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
+ ## 1.3.1 - 2022-03-29
5
+
6
+ ### Fixes
7
+ - RFC 3447 and RFC 8017 allow for optional `DigestAlgorithm` `NULL` parameters
8
+ for `sha*` algorithms and require `NULL` paramters for `md2` and `md5`
9
+ algorithms.
10
+
11
+ ## 1.3.0 - 2022-03-17
12
+
13
+ ### Security
14
+ - Three RSA PKCS#1 v1.5 signature verification issues were reported by Moosa
15
+ Yahyazadeh (moosa-yahyazadeh@uiowa.edu).
16
+ - **HIGH**: Leniency in checking `digestAlgorithm` structure can lead to
17
+ signature forgery.
18
+ - The code is lenient in checking the digest algorithm structure. This can
19
+ allow a crafted structure that steals padding bytes and uses unchecked
20
+ portion of the PKCS#1 encoded message to forge a signature when a low
21
+ public exponent is being used. For more information, please see
22
+ ["Bleichenbacher's RSA signature forgery based on implementation
23
+ error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
24
+ by Hal Finney.
25
+ - CVE ID: [CVE-2022-24771](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24771)
26
+ - GHSA ID: [GHSA-cfm4-qjh2-4765](https://github.com/digitalbazaar/forge/security/advisories/GHSA-cfm4-qjh2-4765)
27
+ - **HIGH**: Failing to check tailing garbage bytes can lead to signature
28
+ forgery.
29
+ - The code does not check for tailing garbage bytes after decoding a
30
+ `DigestInfo` ASN.1 structure. This can allow padding bytes to be removed
31
+ and garbage data added to forge a signature when a low public exponent is
32
+ being used. For more information, please see ["Bleichenbacher's RSA
33
+ signature forgery based on implementation
34
+ error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
35
+ by Hal Finney.
36
+ - CVE ID: [CVE-2022-24772](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24772)
37
+ - GHSA ID: [GHSA-x4jg-mjrx-434g](https://github.com/digitalbazaar/forge/security/advisories/GHSA-x4jg-mjrx-434g)
38
+ - **MEDIUM**: Leniency in checking type octet.
39
+ - `DigestInfo` is not properly checked for proper ASN.1 structure. This can
40
+ lead to successful verification with signatures that contain invalid
41
+ structures but a valid digest.
42
+ - CVE ID: [CVE-2022-24773](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24773)
43
+ - GHSA ID: [GHSA-2r2c-g63r-vccr](https://github.com/digitalbazaar/forge/security/advisories/GHSA-2r2c-g63r-vccr)
44
+
45
+ ### Fixed
46
+ - [asn1] Add fallback to pretty print invalid UTF8 data.
47
+ - [asn1] `fromDer` is now more strict and will default to ensuring all input
48
+ bytes are parsed or throw an error. A new option `parseAllBytes` can disable
49
+ this behavior.
50
+ - **NOTE**: The previous behavior is being changed since it can lead to
51
+ security issues with crafted inputs. It is possible that code doing custom
52
+ DER parsing may need to adapt to this new behavior and optional flag.
53
+ - [rsa] Add and use a validator to check for proper structure of parsed ASN.1
54
+ `RSASSA-PKCS-v1_5` `DigestInfo` data. Additionally check that the hash
55
+ algorithm identifier is a known value from RFC 8017
56
+ `PKCS1-v1-5DigestAlgorithms`. An invalid `DigestInfo` or algorithm identifier
57
+ will now throw an error.
58
+ - **NOTE**: The previous lenient behavior is being changed to be more strict
59
+ since it could lead to security issues with crafted inputs. It is possible
60
+ that code may have to handle the errors from these stricter checks.
61
+
62
+ ### Added
63
+ - [oid] Added missing RFC 8017 PKCS1-v1-5DigestAlgorithms algorithm
64
+ identifiers:
65
+ - `1.2.840.113549.2.2` / `md2`
66
+ - `2.16.840.1.101.3.4.2.4` / `sha224`
67
+ - `2.16.840.1.101.3.4.2.5` / `sha512-224`
68
+ - `2.16.840.1.101.3.4.2.6` / `sha512-256`
69
+
70
+ ## 1.2.1 - 2022-01-11
71
+
72
+ ### Fixed
73
+ - [tests]: Load entire module to improve top-level testing and coverage
74
+ reporting.
75
+ - [log]: Refactor logging setup to avoid use of `URLSearchParams`.
76
+
4
77
  ## 1.2.0 - 2022-01-07
5
78
 
6
79
  ### Fixed