node-forge 1.1.0 → 1.3.0

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,89 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
+ ## 1.3.0 - 2022-03-17
5
+
6
+ ### Security
7
+ - Three RSA PKCS#1 v1.5 signature verification issues were reported by Moosa
8
+ Yahyazadeh (moosa-yahyazadeh@uiowa.edu).
9
+ - **HIGH**: Leniency in checking `digestAlgorithm` structure can lead to
10
+ signature forgery.
11
+ - The code is lenient in checking the digest algorithm structure. This can
12
+ allow a crafted structure that steals padding bytes and uses unchecked
13
+ portion of the PKCS#1 encoded message to forge a signature when a low
14
+ public exponent is being used. For more information, please see
15
+ ["Bleichenbacher's RSA signature forgery based on implementation
16
+ error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
17
+ by Hal Finney.
18
+ - CVE ID: [CVE-2022-24771](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24771)
19
+ - GHSA ID: [GHSA-cfm4-qjh2-4765](https://github.com/digitalbazaar/forge/security/advisories/GHSA-cfm4-qjh2-4765)
20
+ - **HIGH**: Failing to check tailing garbage bytes can lead to signature
21
+ forgery.
22
+ - The code does not check for tailing garbage bytes after decoding a
23
+ `DigestInfo` ASN.1 structure. This can allow padding bytes to be removed
24
+ and garbage data added to forge a signature when a low public exponent is
25
+ being used. For more information, please see ["Bleichenbacher's RSA
26
+ signature forgery based on implementation
27
+ error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
28
+ by Hal Finney.
29
+ - CVE ID: [CVE-2022-24772](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24772)
30
+ - GHSA ID: [GHSA-x4jg-mjrx-434g](https://github.com/digitalbazaar/forge/security/advisories/GHSA-x4jg-mjrx-434g)
31
+ - **MEDIUM**: Leniency in checking type octet.
32
+ - `DigestInfo` is not properly checked for proper ASN.1 structure. This can
33
+ lead to successful verification with signatures that contain invalid
34
+ structures but a valid digest.
35
+ - CVE ID: [CVE-2022-24773](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24773)
36
+ - GHSA ID: [GHSA-2r2c-g63r-vccr](https://github.com/digitalbazaar/forge/security/advisories/GHSA-2r2c-g63r-vccr)
37
+
38
+ ### Fixed
39
+ - [asn1] Add fallback to pretty print invalid UTF8 data.
40
+ - [asn1] `fromDer` is now more strict and will default to ensuring all input
41
+ bytes are parsed or throw an error. A new option `parseAllBytes` can disable
42
+ this behavior.
43
+ - **NOTE**: The previous behavior is being changed since it can lead to
44
+ security issues with crafted inputs. It is possible that code doing custom
45
+ DER parsing may need to adapt to this new behavior and optional flag.
46
+ - [rsa] Add and use a validator to check for proper structure of parsed ASN.1
47
+ `RSASSA-PKCS-v1_5` `DigestInfo` data. Additionally check that the hash
48
+ algorithm identifier is a known value from RFC 8017
49
+ `PKCS1-v1-5DigestAlgorithms`. An invalid `DigestInfo` or algorithm identifier
50
+ will now throw an error.
51
+ - **NOTE**: The previous lenient behavior is being changed to be more strict
52
+ since it could lead to security issues with crafted inputs. It is possible
53
+ that code may have to handle the errors from these stricter checks.
54
+
55
+ ### Added
56
+ - [oid] Added missing RFC 8017 PKCS1-v1-5DigestAlgorithms algorithm
57
+ identifiers:
58
+ - `1.2.840.113549.2.2` / `md2`
59
+ - `2.16.840.1.101.3.4.2.4` / `sha224`
60
+ - `2.16.840.1.101.3.4.2.5` / `sha512-224`
61
+ - `2.16.840.1.101.3.4.2.6` / `sha512-256`
62
+
63
+ ## 1.2.1 - 2022-01-11
64
+
65
+ ### Fixed
66
+ - [tests]: Load entire module to improve top-level testing and coverage
67
+ reporting.
68
+ - [log]: Refactor logging setup to avoid use of `URLSearchParams`.
69
+
70
+ ## 1.2.0 - 2022-01-07
71
+
72
+ ### Fixed
73
+ - [x509] 'Expected' and 'Actual' issuers were backwards in verification failure
74
+ message.
75
+
76
+ ### Added
77
+ - [oid,x509]: Added OID `1.3.14.3.2.29 / sha1WithRSASignature` for sha1 with
78
+ RSA. Considered a deprecated equivalent to `1.2.840.113549.1.1.5 /
79
+ sha1WithRSAEncryption`. See [discussion and
80
+ links](https://github.com/digitalbazaar/forge/issues/825).
81
+
82
+ ### Changed
83
+ - [x509]: Reduce duplicate code. Add helper function to create a signature
84
+ digest given an signature algorithm OID. Add helper function to verify
85
+ signatures.
86
+
4
87
  ## 1.1.0 - 2022-01-06
5
88
 
6
89
  ### Fixed