Skip to content

chore(deps): update node.js to v14.20.0 - autoclosed

Renovate-Bot requested to merge renovate/node-14.x into dev

This MR contains the following updates:

Package Type Update Change
node image minor 14.15.4-alpine -> 14.20.0-alpine

Release Notes

nodejs/node

v14.20.0

Compare Source

This is a security release.

Notable Changes
Commits

v14.19.3

Compare Source

Notable Changes
  • This release updates OpenSSL to 1.1.1o. This update is not being treated as a security release as the issues addressed in OpenSSL 1.1.1o were assessed to not affect Node.js 14. See https://nodejs.org/en/blog/vulnerability/openssl-fixes-in-regular-releases-may2022/ for more information on how the May 2022 OpenSSL releases affects other Node.js release lines.
  • The list of GPG keys used to sign releases has been synchronized with the main branch.
Commits

v14.19.2

Compare Source

Notable Changes

doc:

  • New release key for Bryan English

Learn more at: #​42102 Contributed by Bryan English (@​bengl)

npm:

  • Upgrade npm to v6.14.17.

Learn more at: #​42900 Contributed by Ruy Adorno (@​ruyadorno)

V8:

  • V8 had a stack overflow issue affecting the vm module, cherry-picking cc9a8a37445e from V8 solves this issue.

Learn more at: #​41826 Contributed by Gus Caplan (@​devsnek)

  • Using getHeapSnapshot() was causing a Node.js crash due a V8 issue, this is fixed by backporting 367b0c1e7a32 from V8.

Learn more at: #​42637 Contributed by Chengzhong Wu (@​legendecas)

Commits

v14.19.1

Compare Source

This is a security release.

Notable Changes

Update to OpenSSL 1.1.1n, which addresses the following vulnerability:

Commits

v14.19.0

Compare Source

Notable Changes
Corepack

Node.js now includes Corepack, a script that acts as a bridge between Node.js projects and the package managers they are intended to be used with during development. In practical terms, Corepack will let you use Yarn and pnpm without having to install them - just like what currently happens with npm, which is shipped in Node.js by default. Please head over to the Corepack documentation page for more information on how to use it.

Contributed by Maël Nison - #​39608

ICU updated

ICU has been updated to 70.1. This updates timezone database to 2021a3, including bringing forward the start for DST for Jordan from March to February.

Contributed by Michaël Zasso - #​40658

New option to disable loading of native addons

A new command line option --no-addons has been added to disallow loading of native addons.

Contributed by Dominic Elm - #​39977

Updated Root Certificates

Root certificates have been updated to those from Mozilla's Network Security Services 3.71.

Contributed by Richard Lau - #​40280

Other Notable Changes
  • [0d448eaab5] - (SEMVER-MINOR) crypto: make FIPS related options always available (Vít Ondruch) #​36341
  • [004eafbebf] - (SEMVER-MINOR) lib: add unsubscribe method to non-active DC channels (simon-id) #​40433
  • [625be7585d] - (SEMVER-MINOR) lib: add return value for DC channel.unsubscribe (simon-id) #​40433
  • [607bc74eae] - (SEMVER-MINOR) module: support pattern trailers (Guy Bedford) #​39635
  • [f74fe2a59c] - (SEMVER-MINOR) src: make napi_create_reference accept symbol (JckXia) #​39926
Commits

v14.18.3

Compare Source

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 CVE-2021-44531 after publication.

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 CVE-2021-44532 after publication.

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 CVE-2021-44533 after publication.

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 CVE-2022-21824 after publication.

Thanks to Patrik Oldsberg (rugvip) for reporting this vulnerability.

Commits

v14.18.2

Compare Source

Notable changes

This release contains a c-ares update to fix a regression introduced in Node.js 14.17.5 resolving CNAME records containing underscores #​39780.

Also included are commits to allow Node.js 14 to continue to build and pass tests on our Jenkins CI, including adding Python 3.10 to the list of allowable Python versions for building.

Commits

v14.18.1

Compare Source

This is a security release.

Notable changes
  • CVE-2021-22959: HTTP Request Smuggling due to spaced in headers (Medium)
    • The http parser accepts requests with a space (SP) right after the header name before the colon. This can lead to HTTP Request Smuggling (HRS). More details will be available at CVE-2021-22959 after publication.
  • CVE-2021-22960: HTTP Request Smuggling when parsing the body (Medium)
    • The parse ignores chunk extensions when parsing the body of chunked requests. This leads to HTTP Request Smuggling (HRS) under certain conditions. More details will be available at CVE-2021-22960 after publication.
Commits

v14.18.0

Compare Source

Notable Changes
  • [3a60de0135] - assert: change status of legacy asserts (James M Snell) #​38113
  • [df37c106a7] - (SEMVER-MINOR) buffer: introduce Blob (James M Snell) #​36811
  • [223494c548] - (SEMVER-MINOR) buffer: add base64url encoding option (Filip Skokan) #​36952
  • [14fc4ddabc] - (SEMVER-MINOR) child_process: allow options.cwd receive a URL (Khaidi Chu) #​38862
  • [b68b13acb3] - (SEMVER-MINOR) child_process: add timeout to spawn and fork (Nitzan Uziely) #​37256
  • [da98c9f99b] - (SEMVER-MINOR) child_process: allow promisified exec to be cancel (Carlos Fuentes) #​34249
  • [779310ac87] - (SEMVER-MINOR) child_process: add 'overlapped' stdio flag (Thiago Padilha) #​29412
  • [40eb3b79f1] - (SEMVER-MINOR) cli: add -C alias for --conditions flag (Guy Bedford) #​38755
  • [39eba0a2e1] - (SEMVER-MINOR) cli: add --node-memory-debug option (Anna Henningsen) #​35537
  • [d8d9a9628a] - (SEMVER-MINOR) dns: add "tries" option to Resolve options (Luan Devecchi) #​39610
  • [15ba19b020] - (SEMVER-MINOR) dns: allow --dns-result-order to change default dns verbatim (Ouyang Yadong) #​38099
  • [307c1d817f] - doc: refactor fs docs structure (James M Snell) #​37170
  • [9ee3f77e32] - (SEMVER-MINOR) errors: remove experimental from --enable-source-maps (Benjamin Coe) #​37362
  • [e73bfed2f4] - esm: deprecate legacy main lookup for modules (Guy Bedford) #​36918
  • [989c204a58] - (SEMVER-MINOR) fs: allow empty string for temp directory prefix (Voltrex) #​39028
  • [ef72490cde] - (SEMVER-MINOR) fs: allow no-params fsPromises fileHandle read (Nitzan Uziely) #​38287
  • [cad9d20f64] - (SEMVER-MINOR) fs: add support for async iterators to fsPromises.writeFile (HiroyukiYagihashi) #​37490
  • [2b0e2706c0] - fs: improve fsPromises readFile performance (Nitzan Uziely) #​37608
  • [fe12cc07b3] - (SEMVER-MINOR) fs: add fsPromises.watch() (James M Snell) #​37179
  • [2459c115a8] - (SEMVER-MINOR) fs: allow position parameter to be a BigInt in read and readSync (Darshan Sen) #​36190
  • [6544cfb4b9] - (SEMVER-MINOR) http2: add support for sensitive headers (Anna Henningsen) #​34145
  • [a6c6cbb4e6] - (SEMVER-MINOR) http2: allow setting the local window size of a session (Yongsheng Zhang) #​35978
  • [1e5aca550c] - inspector: mark as stable (Gireesh Punathil) #​37748
  • [93af04afbb] - (SEMVER-MINOR) module: add support for URL to import.meta.resolve (Antoine du Hamel) #​38587
  • [f9f9389d83] - (SEMVER-MINOR) module: add support for node:‑prefixed require(…) calls (ExE Boss) #​37246
  • [87c71065eb] - (SEMVER-MINOR) net: introduce net.BlockList (James M Snell) #​34625
  • [b421d99a48] - (SEMVER-MINOR) node-api: allow retrieval of add-on file name (Gabriel Schulhof) #​37195
  • [6a4811df8a] - (SEMVER-MINOR) os: add os.devNull (Luigi Pinca) #​38569
  • [4a88ddeeca] - (SEMVER-MINOR) perf_hooks: introduce createHistogram (James M Snell) #​37155
  • [1a6bf1c4a3] - (SEMVER-MINOR) process: add api to enable source-maps programmatically (legendecas) #​39085
  • [99735a6fe8] - (SEMVER-MINOR) process: add 'worker' event (James M Snell) #​38659
  • [3982919317] - (SEMVER-MINOR) process: add direct access to rss without iterating pages (Adrien Maret) #​34291
  • [526e6c7bde] - (SEMVER-MINOR) readline: add AbortSignal support to interface (Nitzan Uziely) #​37932
  • [e6eee08692] - (SEMVER-MINOR) readline: add support for the AbortController to the question method (Mattias Runge-Broberg) #​33676
  • [32de361d70] - (SEMVER-MINOR) readline: add history event and option to set initial history (Mattias Runge-Broberg) #​33662
  • [797f7f8a38] - (SEMVER-MINOR) repl: add auto‑completion for node:‑prefixed require(…) calls (ExE Boss) #​37246
  • [abfd71b64c] - (SEMVER-MINOR) src: call overload ctor from the original ctor (Darshan Sen) #​39768
  • [1efae01b18] - (SEMVER-MINOR) src: add a constructor overload for CallbackScope (Darshan Sen) #​39768
  • [f7933804ba] - (SEMVER-MINOR) src: allow to negate boolean CLI flags (Michaël Zasso) #​39023
  • [6d06ac2202] - (SEMVER-MINOR) src: add --heapsnapshot-near-heap-limit option (Joyee Cheung) #​33010
  • [577d228ca0] - (SEMVER-MINOR) src: add way to get IsolateData and allocator from Environment (Anna Henningsen) #​36441
  • [658a266cd4] - (SEMVER-MINOR) src: allow preventing SetPrepareStackTraceCallback (Shelley Vohr) #​36447
  • [f421422ea4] - (SEMVER-MINOR) src: add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) #​35486
  • [a62d4d60f4] - (SEMVER-MINOR) stream: add readableDidRead if has been read from (Robert Nagy) #​39589
  • [63502131a3] - (SEMVER-MINOR) stream: pipeline accept Buffer as a valid first argument (Nitzan Uziely) #​37739
  • [68bbebd42c] - (SEMVER-MINOR) tls: allow reading data into a static buffer (Andrey Pechkurov) #​35753
  • [1cbb74d63d] - (SEMVER-MINOR) url: expose urlToHttpOptions utility (Yongsheng Zhang) #​35960
  • [8eb11356dd] - (SEMVER-MINOR) util: expose toUSVString (Robert Nagy) #​39814
  • [84fcdc3074] - (SEMVER-MINOR) v8: implement v8.stopCoverage() (Joyee Cheung) #​33807
  • [b238b6bf17] - (SEMVER-MINOR) v8: implement v8.takeCoverage() (Joyee Cheung) #​33807
  • [9f6bc58da8] - (SEMVER-MINOR) worker: add setEnvironmentData/getEnvironmentData (James M Snell) #​37486
Commits
Semver-minor commits
  • [f3563d3197] - (SEMVER-MINOR) async_hooks: use new v8::Context PromiseHook API (Stephen Belanger) #​36394
  • [df37c106a7] - (SEMVER-MINOR) buffer: introduce Blob (James M Snell) #​36811
  • [223494c548] - (SEMVER-MINOR) buffer: add base64url encoding option (Filip Skokan) #​36952
  • [14fc4ddabc] - (SEMVER-MINOR) child_process: allow options.cwd receive a URL (Khaidi Chu) #​38862
  • [b68b13acb3] - (SEMVER-MINOR) child_process: add timeout to spawn and fork (Nitzan Uziely) #​37256
  • [da98c9f99b] - (SEMVER-MINOR) child_process: allow promisified exec to be cancel (Carlos Fuentes) #​34249
  • [779310ac87] - (SEMVER-MINOR) child_process: add 'overlapped' stdio flag (Thiago Padilha) #​29412
  • [40eb3b79f1] - (SEMVER-MINOR) cli: add -C alias for --conditions flag (Guy Bedford) #​38755
  • [39eba0a2e1] - (SEMVER-MINOR) cli: add --node-memory-debug option (Anna Henningsen) #​35537
  • [d9b58a0262] - (SEMVER-MINOR) deps: V8: cherry-pick fa4cb17 (Stephen Belanger) #​38577
  • [9d7177c152] - (SEMVER-MINOR) deps: V8: cherry-pick 4c07451 (Stephen Belanger) #​36394
  • [ec0f0ef8ef] - (SEMVER-MINOR) deps: V8: cherry-pick 5f44131 (Stephen Belanger) #​36394
  • [3e7238e45a] - (SEMVER-MINOR) deps: V8: cherry-pick 272445f (Stephen Belanger) #​36394
  • [214e568597] - (SEMVER-MINOR) deps: V8: backport c0fceaa (Stephen Belanger) #​36394
  • [d8d9a9628a] - (SEMVER-MINOR) dns: add "tries" option to Resolve options (Luan Devecchi) #​39610
  • [15ba19b020] - (SEMVER-MINOR) dns: allow --dns-result-order to change default dns verbatim (Ouyang Yadong) #​38099
  • [defb77cac9] - (SEMVER-MINOR) doc: add missing change to resolver ctor (Luan Devecchi) #​39610
  • [9ee3f77e32] - (SEMVER-MINOR) errors: remove experimental from --enable-source-maps (Benjamin Coe) #​37362
  • [989c204a58] - (SEMVER-MINOR) fs: allow empty string for temp directory prefix (Voltrex) #​39028
  • [ef72490cde] - (SEMVER-MINOR) fs: allow no-params fsPromises fileHandle read (Nitzan Uziely) #​38287
  • [cad9d20f64] - (SEMVER-MINOR) fs: add support for async iterators to fsPromises.writeFile (HiroyukiYagihashi) #​37490
  • [fe12cc07b3] - (SEMVER-MINOR) fs: add fsPromises.watch() (James M Snell) #​37179
  • [2459c115a8] - (SEMVER-MINOR) fs: allow position parameter to be a BigInt in read and readSync (Darshan Sen) #​36190
  • [6544cfb4b9] - (SEMVER-MINOR) http2: add support for sensitive headers (Anna Henningsen) #​34145
  • [a6c6cbb4e6] - (SEMVER-MINOR) http2: allow setting the local window size of a session (Yongsheng Zhang) #​35978
  • [93af04afbb] - (SEMVER-MINOR) module: add support for URL to import.meta.resolve (Antoine du Hamel) #​38587
  • [f9f9389d83] - (SEMVER-MINOR) module: add support for node:‑prefixed require(…) calls (ExE Boss) #​37246
  • [76d4f22bab] - (SEMVER-MINOR) net: allow net.BlockList to use net.SocketAddress objects (James M Snell) #​37917
  • [82363d864d] - (SEMVER-MINOR) net: add SocketAddress class (James M Snell) #​37917
  • [0202ba46b8] - (SEMVER-MINOR) net: make net.BlockList cloneable (James M Snell) #​37917
  • [a41a3e3b3f] - (SEMVER-MINOR) net: make blocklist family case insensitive (James M Snell) #​34864
  • [87c71065eb] - (SEMVER-MINOR) net: introduce net.BlockList (James M Snell) #​34625
  • [b421d99a48] - (SEMVER-MINOR) node-api: allow retrieval of add-on file name (Gabriel Schulhof) #​37195
  • [6a4811df8a] - (SEMVER-MINOR) os: add os.devNull (Luigi Pinca) #​38569
  • [4a88ddeeca] - (SEMVER-MINOR) perf_hooks: introduce createHistogram (James M Snell) #​37155
  • [1a6bf1c4a3] - (SEMVER-MINOR) process: add api to enable source-maps programmatically (legendecas) #​39085
  • [99735a6fe8] - (SEMVER-MINOR) process: add 'worker' event (James M Snell) #​38659
  • [3982919317] - (SEMVER-MINOR) process: add direct access to rss without iterating pages (Adrien Maret) #​34291
  • [526e6c7bde] - (SEMVER-MINOR) readline: add AbortSignal support to interface (Nitzan Uziely) #​37932
  • [e6eee08692] - (SEMVER-MINOR) readline: add support for the AbortController to the question method (Mattias Runge-Broberg) #​33676
  • [32de361d70] - (SEMVER-MINOR) readline: add history event and option to set initial history (Mattias Runge-Broberg) #​33662
  • [797f7f8a38] - (SEMVER-MINOR) repl: add auto‑completion for node:‑prefixed require(…) calls (ExE Boss) #​37246
  • [abfd71b64c] - (SEMVER-MINOR) src: call overload ctor from the original ctor (Darshan Sen) #​39768
  • [1efae01b18] - (SEMVER-MINOR) src: add a constructor overload for CallbackScope (Darshan Sen) #​39768
  • [1aa2080d29] - (SEMVER-MINOR) src: fix align in cares_wrap.h (Luan) #​39610
  • [f7933804ba] - (SEMVER-MINOR) src: allow to negate boolean CLI flags (Michaël Zasso) #​39023
  • [6d06ac2202] - (SEMVER-MINOR) src: add --heapsnapshot-near-heap-limit option (Joyee Cheung) #​33010
  • [4091eb9db7] - (SEMVER-MINOR) src: move node_binding to modern THROW_ERR* (James M Snell) #​35469
  • [577d228ca0] - (SEMVER-MINOR) src: add way to get IsolateData and allocator from Environment (Anna Henningsen) #​36441
  • [658a266cd4] - (SEMVER-MINOR) src: allow preventing SetPrepareStackTraceCallback (Shelley Vohr) #​36447
  • [f421422ea4] - (SEMVER-MINOR) src: add maybe versions of EmitExit and EmitBeforeExit (Anna Henningsen) #​35486
  • [a62d4d60f4] - (SEMVER-MINOR) stream: add readableDidRead if has been read from (Robert Nagy) #​39589
  • [63502131a3] - (SEMVER-MINOR) stream: pipeline accept Buffer as a valid first argument (Nitzan Uziely) #​37739
  • [72ef41c72b] - (SEMVER-MINOR) test: add wpt tests for Blob (Michaël Zasso) #​36811
  • [68bbebd42c] - (SEMVER-MINOR) tls: allow reading data into a static buffer (Andrey Pechkurov) #​35753
  • [587deacad9] - (SEMVER-MINOR) tools: add Worker to type-parser (James M Snell) #​38659
  • [1cbb74d63d] - (SEMVER-MINOR) url: expose urlToHttpOptions utility (Yongsheng Zhang) #​35960
  • [8eb11356dd] - (SEMVER-MINOR) util: expose toUSVString (Robert Nagy) #​39814
  • [84fcdc3074] - (SEMVER-MINOR) v8: implement v8.stopCoverage() (Joyee Cheung) #​33807
  • [b238b6bf17] - (SEMVER-MINOR) v8: implement v8.takeCoverage() (Joyee Cheung) #​33807
  • [9f6bc58da8] - (SEMVER-MINOR) worker: add setEnvironmentData/getEnvironmentData (James M Snell) #​37486
Semver-patch commits
Documentation commits
Other commits

v14.17.6

Compare Source

This is a security release.

Notable Changes

These are vulnerabilities in the node-tar, arborist, and npm cli modules which are related to the initial reports and subsequent remediation of node-tar vulnerabilities CVE-2021-32803 and CVE-2021-32804. Subsequent internal security review of node-tar and additional external bounty reports have resulted in another 5 CVE being remediated in core npm CLI dependencies including node-tar, and npm arborist.

You can read more about it in:

Commits

v14.17.5

Compare Source

This is a security release.

Notable Changes
  • CVE-2021-3672/CVE-2021-22931: Improper handling of untypical characters in domain names (High)
    • Node.js was vulnerable to Remote Code Execution, XSS, application crashes due to missing input validation of hostnames returned by Domain Name Servers in the Node.js DNS library which can lead to the output of wrong hostnames (leading to Domain Hijacking) and injection vulnerabilities in applications using the library. You can read more about it at https://nvd.nist.gov/vuln/detail/CVE-2021-22931.
  • CVE-2021-22940: Use after free on close http2 on stream canceling (High)
    • Node.js was vulnerable to a use after free attack where an attacker might be able to exploit memory corruption to change process behavior. This release includes a follow-up fix for CVE-2021-22930 as the issue was not completely resolved by the previous fix. You can read more about it at https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22940.
  • CVE-2021-22939: Incomplete validation of rejectUnauthorized parameter (Low)
    • If the Node.js HTTPS API was used incorrectly and "undefined" was in passed for the "rejectUnauthorized" parameter, no error was returned and connections to servers with an expired certificate would have been accepted. You can read more about it at https://nvd.nist.gov/vuln/detail/CVE-2021-22939.
Commits

v14.17.4

Compare Source

This is a security release.

Notable Changes
  • CVE-2021-22930: Use after free on close http2 on stream canceling (High)

This releases also fixes some regressions with internationalization introduced by the ICU updates in Node.js 14.17.0 and 14.17.1.

Commits

v14.17.3

Compare Source

Notable Changes

Node.js 14.17.2 introduced a regression in the Windows installer on non-English locales that is being fixed in this release. There is no need to download this release if you are not using the Windows installer.

Commits

v14.17.2

Compare Source

This is a security release.

Notable Changes

Vulnerabilities fixed:

  • CVE-2021-22918: libuv upgrade - Out of bounds read (Medium)
    • Node.js is vulnerable to out-of-bounds read in libuv's uv__idna_toascii() function which is used to convert strings to ASCII. This is called by Node's dns module's lookup() function and can lead to information disclosures or crashes. You can read more about it in https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22918
  • CVE-2021-22921: Windows installer - Node Installer Local Privilege Escalation (Medium)
    • Node.js is vulnerable to local privilege escalation attacks under certain conditions on Windows platforms. More specifically, improper configuration of permissions in the installation directory allows an attacker to perform two different escalation attacks: PATH and DLL hijacking. You can read more about it in https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-22921
Commits

v14.17.1

Compare Source

Notable Changes
Commits

v14.17.0

Compare Source

Notable Changes
Diagnostics channel (experimental module)

diagnostics_channel is a new experimental module that provides an API to create named channels to report arbitrary message data for diagnostics purposes.

The module was initially introduced in Node.js v15.1.0 and is backported to v14.17.0 to enable testing it at a larger scale.

With diagnostics_channel, Node.js core and module authors can publish contextual data about what they are doing at a given time. This could be the hostname and query string of a mysql query, for example. Just create a named channel with dc.channel(name) and call channel.publish(data) to send the data to any listeners to that channel.

const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

MySQL.prototype.query = function query(queryString, values, callback) {
  // Broadcast query information whenever a query is made
  channel.publish({
    query: queryString,
    host: this.hostname,
  });

  this.doQuery(queryString, values, callback);
};

Channels are like one big global event emitter but are split into separate objects to ensure they get the best performance. If nothing is listening to the channel, the publishing overhead should be as close to zero as possible. Consuming channel data is as easy as using channel.subscribe(listener) to run a function whenever a message is published to that channel.

const dc = require('diagnostics_channel');
const channel = dc.channel('mysql.query');

channel.subscribe(({ query, host }) => {
  console.log(`mysql query to ${host}: ${query}`);
});

The data captured can be used to provide context for what an app is doing at a given time. This can be used for things like augmenting tracing data, tracking network and filesystem activity, logging queries, and many other things. It's also a very useful data source for diagnostics tools to provide a clearer picture of exactly what the application is doing at a given point in the data they are presenting.

Contributed by Stephen Belanger #​34895.

UUID support in the crypto module

The new crypto.randomUUID() method now allows to generate random RFC 4122 Version 4 UUID strings:

const { randomUUID } = require('crypto');

console.log(randomUUID());
// 'aa7c91a1-f8fc-4339-b9db-f93fc7233429'

Contributed by James M Snell #​36729.

Experimental support for AbortController and AbortSignal

Node.js 14.17.0 adds experimental partial support for AbortController and AbortSignal.

Both constructors can be enabled globally using the --experimental-abortcontroller flag.

Additionally, several Node.js APIs have been updated to support AbortSignal for cancellation. It is not mandatory to use the built-in constructors with them. Any spec-compliant third-party alternatives should be compatible.

AbortSignal support was added to the following methods:

  • child_process.exec
  • child_process.execFile
  • child_process.fork
  • child_process.spawn
  • dgram.createSocket
  • events.on
  • events.once
  • fs.readFile
  • fs.watch
  • fs.writeFile
  • http.request
  • https.request
  • http2Session.request
  • The promisified variants of setImmediate and setTimeout
Other notable changes
  • doc:
    • revoke deprecation of legacy url, change status to legacy (James M Snell) #​37784
    • add legacy status to stability index (James M Snell) #​37784
    • upgrade stability status of report API (Gireesh Punathil) #​35654
  • deps:
    • V8: Backport various patches for Apple Silicon support (BoHong Li) #​38051
    • update ICU to 68.1 (Michaël Zasso) #​36187
    • upgrade to libuv 1.41.0 (Colin Ihrig) #​37360
  • http:
    • add http.ClientRequest.getRawHeaderNames() (simov) #​37660
    • report request start and end with diagnostics_channel (Stephen Belanger) #​34895
  • util:
    • add getSystemErrorMap() impl (eladkeyshawn) #​38101
Commits

v14.16.1

Compare Source

This is a security release.

Notable Changes

Vulnerabilities fixed:

  • CVE-2021-3450: OpenSSL - CA certificate check bypass with X509_V_FLAG_X509_STRICT (High)
  • CVE-2021-3449: OpenSSL - NULL pointer deref in signature_algorithms processing (High)
  • CVE-2020-7774: npm upgrade - Update y18n to fix Prototype-Pollution (High)
Commits

v14.16.0

Compare Source

This is a security release.

Notable changes

Vulnerabilities fixed:

  • CVE-2021-22883: HTTP2 'unknownProtocol' cause Denial of Service by resource exhaustion
    • Affected Node.js versions are vulnerable to denial of service attacks when too many connection attempts with an 'unknownProtocol' are established. This leads to a leak of file descriptors. If a file descriptor limit is configured on the system, then the server is unable to accept new connections and prevent the process also from opening, e.g. a file. If no file descriptor limit is configured, then this lead to an excessive memory usage and cause the system to run out of memory.
  • CVE-2021-22884: DNS rebinding in --inspect
    • Affected Node.js versions are vulnerable to denial of service attacks when the whitelist includes “localhost6”. When “localhost6” is not present in /etc/hosts, it is just an ordinary domain that is resolved via DNS, i.e., over network. If the attacker controls the victim's DNS server or can spoof its responses, the DNS rebinding protection can be bypassed by using the “localhost6” domain. As long as the attacker uses the “localhost6” domain, they can still apply the attack described in CVE-2018-7160.
  • CVE-2021-23840: OpenSSL - Integer overflow in CipherUpdate
Commits

v14.15.5

Compare Source

Notable Changes
  • deps:
    • upgrade npm to 6.14.11 (Ruy Adorno) #​37173
    • V8: backport dfcf1e8 (Michaël Zasso) #​37245
      • Note: Node.js is not believed to be vulnerable to CVE-2021-21148.
  • stream,zlib: do not use _stream_* anymore (Matteo Collina) #​36618
Commits

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.


  • If you want to rebase/retry this MR, click this checkbox.

This MR has been generated by Renovate Bot.

Edited by Renovate-Bot

Merge request reports

Loading