node-forge 0.8.4 → 0.9.2

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,47 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
+ ## 0.9.2 - 2019-09-01
5
+
6
+ ### Changed
7
+ - Added `util.setPath` security note to function docs and to README.
8
+
9
+ ### Notes
10
+ - **SECURITY**: The `util.setPath` function has the potential to cause
11
+ prototype pollution if used with unsafe input.
12
+ - This function is **not** used internally by `forge`.
13
+ - The rest of the library is unaffected by this issue.
14
+ - **Do not** use unsafe input with this function.
15
+ - Usage with known input should function as expected. (Including input
16
+ intentionally using potentially problematic keys.)
17
+ - No code changes will be made to address this issue in 0.9.x. The current
18
+ behavior *could* be considered a feature rather than a security issue.
19
+ 0.10.0 will be released that removes `util.getPath` and `util.setPath`.
20
+ Consider `get` and `set` from [lodash](https://lodash.com/) if you need
21
+ replacements. But also consider the potential similar security issues with
22
+ those APIs.
23
+ - https://snyk.io/vuln/SNYK-JS-NODEFORGE-598677
24
+ - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7720
25
+
26
+ ## 0.9.1 - 2019-09-26
27
+
28
+ ### Fixed
29
+ - Ensure DES-CBC given IV is long enough for block size.
30
+
31
+ ## 0.9.0 - 2019-09-04
32
+
33
+ ### Added
34
+ - Add ed25519.publicKeyFromAsn1 and ed25519.privateKeyFromAsn1 APIs.
35
+ - A few OIDs used in EV certs.
36
+
37
+ ### Fixed
38
+ - Improve ed25519 NativeBuffer check.
39
+
40
+ ## 0.8.5 - 2019-06-18
41
+
42
+ ### Fixed
43
+ - Remove use of `const`.
44
+
4
45
  ## 0.8.4 - 2019-05-22
5
46
 
6
47
  ### Changed
package/README.md CHANGED
@@ -1409,15 +1409,17 @@ var privateKeyInfo = pki.wrapRsaPrivateKey(rsaPrivateKey);
1409
1409
  // convert a PKCS#8 ASN.1 PrivateKeyInfo to PEM
1410
1410
  var pem = pki.privateKeyInfoToPem(privateKeyInfo);
1411
1411
 
1412
- // encrypts a PrivateKeyInfo and outputs an EncryptedPrivateKeyInfo
1412
+ // encrypts a PrivateKeyInfo using a custom password and
1413
+ // outputs an EncryptedPrivateKeyInfo
1413
1414
  var encryptedPrivateKeyInfo = pki.encryptPrivateKeyInfo(
1414
- privateKeyInfo, 'password', {
1415
+ privateKeyInfo, 'myCustomPasswordHere', {
1415
1416
  algorithm: 'aes256', // 'aes128', 'aes192', 'aes256', '3des'
1416
1417
  });
1417
1418
 
1418
- // decrypts an ASN.1 EncryptedPrivateKeyInfo
1419
+ // decrypts an ASN.1 EncryptedPrivateKeyInfo that was encrypted
1420
+ // with a custom password
1419
1421
  var privateKeyInfo = pki.decryptPrivateKeyInfo(
1420
- encryptedPrivateKeyInfo, 'password');
1422
+ encryptedPrivateKeyInfo, 'myCustomPasswordHere');
1421
1423
 
1422
1424
  // converts an EncryptedPrivateKeyInfo to PEM
1423
1425
  var pem = pki.encryptedPrivateKeyToPem(encryptedPrivateKeyInfo);
@@ -2033,6 +2035,8 @@ When using this code please keep the following in mind:
2033
2035
  - Certain features in this library are less susceptible to attacks depending on
2034
2036
  usage. This primarily includes features that deal with data format
2035
2037
  manipulation or those that are not involved in communication.
2038
+ - Do not pass unsafe inputs to `util.setPath`. Doing so could expose a
2039
+ prototype pollution security issue.
2036
2040
 
2037
2041
  Library Background
2038
2042
  ------------------