Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v16.13.1
Choose a base ref
...
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v16.13.2
Choose a head ref
  • 8 commits
  • 84 files changed
  • 5 contributors

Commits on Dec 1, 2021

  1. Working on v16.13.2

    PR-URL: #40974
    BethGriggs committed Dec 1, 2021
    Configuration menu
    Copy the full SHA
    0370a26 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2022

  1. console: fix prototype pollution via console.table

    CVE-ID: CVE-2022-21824
    PR-URL: nodejs-private/node-private#307
    Refs: https://hackerone.com/reports/1431042
    Reviewed-By: Matteo Collina <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    Reviewed-By: Π‘ΠΊΠΎΠ²ΠΎΡ€ΠΎΠ΄Π° Никита АндрССвич <[email protected]>
    Reviewed-By: MichaΓ«l Zasso <[email protected]>
    Reviewed-By: Richard Lau <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    tniessen authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    8dd4ca4 View commit details
    Browse the repository at this point in the history
  2. src: remove unused x509 functions

    These functions are currently not being used and their security should
    be audited before any potential future use.
    
    Co-authored-by: Akshay K <[email protected]>
    Backport-PR-URL: nodejs-private/node-private#304
    PR-URL: nodejs-private/node-private#300
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    2 people authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    4a262d4 View commit details
    Browse the repository at this point in the history
  3. crypto,tls: implement safe x509 GeneralName format

    This change introduces JSON-compatible escaping rules for strings that
    include X.509 GeneralName components (see RFC 5280). This non-standard
    format avoids ambiguities and prevents injection attacks that could
    previously lead to X.509 certificates being accepted even though they
    were not valid for the target hostname.
    
    These changes affect the format of subject alternative names and the
    format of authority information access. The checkServerIdentity function
    has been modified to safely handle the new format, eliminating the
    possibility of injecting subject alternative names into the verification
    logic.
    
    Because each subject alternative name is only encoded as a JSON string
    literal if necessary for security purposes, this change will only be
    visible in rare cases.
    
    This addresses CVE-2021-44532.
    
    Co-authored-by: Akshay K <[email protected]>
    CVE-ID: CVE-2021-44532
    Backport-PR-URL: nodejs-private/node-private#304
    PR-URL: nodejs-private/node-private#300
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    2 people authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    e52882d View commit details
    Browse the repository at this point in the history
  4. tls: drop support for URI alternative names

    Previously, Node.js incorrectly accepted uniformResourceIdentifier (URI)
    subject alternative names in checkServerIdentity regardless of the
    application protocol. This was incorrect even in the most common cases.
    For example, RFC 2818 specifies (and RFC 6125 confirms) that HTTP over
    TLS only uses dNSName and iPAddress subject alternative names, but not
    uniformResourceIdentifier subject alternative names.
    
    Additionally, name constrained certificate authorities might not be
    constrained to specific URIs, allowing them to issue certificates for
    URIs that specify hosts that they would not be allowed to issue dNSName
    certificates for.
    
    Even for application protocols that make use of URI subject alternative
    names (such as SIP, see RFC 5922), Node.js did not implement the
    required checks correctly, for example, because checkServerIdentity
    ignores the URI scheme.
    
    As a side effect, this also fixes an edge case. When a hostname is not
    an IP address and no dNSName subject alternative name exists, the
    subject's Common Name should be considered even when an iPAddress
    subject alternative name exists.
    
    It remains possible for users to pass a custom checkServerIdentity
    function to the TLS implementation in order to implement custom identity
    verification logic.
    
    This addresses CVE-2021-44531.
    
    Co-authored-by: Akshay K <[email protected]>
    CVE-ID: CVE-2021-44531
    Backport-PR-URL: nodejs-private/node-private#304
    PR-URL: nodejs-private/node-private#300
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    2 people authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    a2cbfa9 View commit details
    Browse the repository at this point in the history
  5. tls: fix handling of x509 subject and issuer

    When subject and verifier are represented as strings, escape special
    characters (such as '+') to guarantee unambiguity. Previously, different
    distinguished names could result in the same string when encoded. In
    particular, inserting a '+' in a single-value Relative Distinguished
    Name (e.g., L or OU) would produce a string that is indistinguishable
    from a multi-value Relative Distinguished Name. Third-party code that
    correctly interprets the generated string representation as a
    multi-value Relative Distinguished Name could then be vulnerable to an
    injection attack, e.g., when an attacker includes a single-value RDN
    with type OU and value 'HR + CN=example.com', the string representation
    produced by unpatched versions of Node.js would be
    'OU=HR + CN=example.com', which represents a multi-value RDN.
    
    Node.js itself is not vulnerable to this attack because the current
    implementation that parses such strings into objects does not handle '+'
    at all. This oversight leads to incorrect results, but at the same time
    appears to prevent injection attacks (as described above).
    
    With this change, the JavaScript objects representing the subject and
    issuer Relative Distinguished Names are constructed in C++ directly,
    instead of (incorrectly) encoding them as strings and then (incorrectly)
    decoding the strings in JavaScript.
    
    This addresses CVE-2021-44533.
    
    Co-authored-by: Akshay K <[email protected]>
    CVE-ID: CVE-2021-44533
    Backport-PR-URL: nodejs-private/node-private#304
    PR-URL: nodejs-private/node-private#300
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    2 people authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    965536f View commit details
    Browse the repository at this point in the history
  6. src: add cve reverts and associated tests

    Signed-off-by: Michael Dawson <[email protected]>
    Co-authored-by: Akshay K <[email protected]>
    Backport-PR-URL: nodejs-private/node-private#304
    PR-URL: nodejs-private/node-private#300
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    2 people authored and danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    9a0a189 View commit details
    Browse the repository at this point in the history
  7. 2022-01-10, Version 16.13.2 'Gallium' (LTS)

    This is a security release.
    
    Notable changes:
    
    Improper handling of URI Subject Alternative Names (Medium)(CVE-2021-44531)
    - Accepting arbitrary Subject Alternative Name (SAN) types, unless a PKI
    is specifically defined to use a particular SAN type, can result in
    bypassing name-constrained intermediates. Node.js was accepting URI SAN
    types, which PKIs are often not defined to use. Additionally, when a
    protocol allows URI SANs, Node.js did not match the URI correctly.
    - Versions of Node.js with the fix for this disable the URI SAN type when
    checking a certificate against a hostname. This behavior can be
    reverted through the `--security-revert` command-line option.
    - More details will be available at
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531
    
    Certificate Verification Bypass via String Injection (Medium)(CVE-2021-44532)
    - Node.js converts SANs (Subject Alternative Names) to a string format.
    It uses this string to check peer certificates against hostnames when
    validating connections. The string format was subject to an injection
    vulnerability when name constraints were used within a certificate
    chain, allowing the bypass of these name constraints.
    - Versions of Node.js with the fix for this escape SANs containing the
    problematic characters in order to prevent the injection. This
    behavior can be reverted through the `--security-revert` command-line
    option.
    - More details will be available at
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532
    
    Incorrect handling of certificate subject and issuer fields (Medium)(CVE-2021-44533)
    - Node.js did not handle multi-value Relative Distinguished Names
    correctly. Attackers could craft certificate subjects containing a
    single-value Relative Distinguished Name that would be interpreted as a
    multi-value Relative Distinguished Name, for example, in order to inject
    a Common Name that would allow bypassing the certificate subject
    verification.
    - Affected versions of Node.js do not accept multi-value Relative
    Distinguished Names and are thus not vulnerable to such attacks
    themselves. However, third-party code that uses node's ambiguous
    presentation of certificate subjects may be vulnerable.
    - More details will be available at
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44533
    
    Prototype pollution via `console.table` properties (Low)(CVE-2022-21824)
    - Due to the formatting logic of the `console.table()` function it was
    not safe to allow user controlled input to be passed to the `properties`
    parameter while simultaneously passing a plain object with at least one
    property as the first parameter, which could be `__proto__`. The
    prototype pollution has very limited control, in that it only allows an
    empty string to be assigned numerical keys of the object prototype.
    - Versions of Node.js with the fix for this use a null protoype for the
    object these properties are being assigned to.
    - More details will be available at
    https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-21824
    
    PR-URL: nodejs-private/node-private#312
    danielleadams committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    acb71ea View commit details
    Browse the repository at this point in the history
Loading