Commit Graph
45843 Commits
Author SHA1 Message Date
Matteo Collina 57a71cd50d http2: validate initialWindowSize per HTTP/2 spec
The HTTP/2 spec (RFC 7540) defines SETTINGS_INITIAL_WINDOW_SIZE
maximum as 2^31-1. Values above this must be treated as a
FLOW_CONTROL_ERROR. Previously, Node.js allowed values up to
2^32-1 which caused nghttp2_submit_settings() to return
NGHTTP2_ERR_INVALID_ARGUMENT, triggering an uncatchable
assertion failure and crashing the process.

This change adds proper validation to reject values >= 2^31
with a catchable RangeError before they reach nghttp2.

PR-URL: https://github.com/nodejs/node/pull/61402
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-01-19 07:35:13 +00:00
Ryuhei Shima 5f982e2879 child_process: treat ipc length header as unsigned uint32
Fixes: https://github.com/nodejs/node/issues/61312
PR-URL: https://github.com/nodejs/node/pull/61344
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-01-19 01:16:25 +00:00
Jurj Andrei George 637bda0238 sqlite: enable Percentile extension
PR-URL: https://github.com/nodejs/node/pull/61295
Refs: https://github.com/nodejs/node/issues/60618
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-01-18 13:07:14 +00:00
sangwookandMarco Ippolito 9bcfbeb236 doc: refine WebAssembly error documentation
Co-authored-by: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61382
Fixes: https://github.com/nodejs/node/issues/61353
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-01-17 21:00:39 +00:00
sangwook 04c8828863 lib: fix TypeScript support check in jitless mode
WebAssembly is disabled when Node.js is run with --jitless. The
internal TypeScript stripper relies on WebAssembly, and previously
failed obscurely with a ReferenceError in this mode.

This commit adds an explicit check for WebAssembly support when
loading the TypeScript parser. If WebAssembly is unavailable,
it now throws a descriptive ERR_WEBASSEMBLY_NOT_SUPPORTED error.

Fixes: https://github.com/nodejs/node/issues/61353
PR-URL: https://github.com/nodejs/node/pull/61382
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2026-01-17 21:00:38 +00:00
Abhishek Kv. Savani 79ddd1ba10 test_runner: fix memory leaks in runner
- Close readline interface after child process exits
  Prevents accumulation of event listeners on stderr stream

- Extract watch mode event handler to named function
  Allows proper cleanup when watch mode is aborted

These changes prevent unbounded memory growth in long-running
test suites and watch mode sessions.

PR-URL: https://github.com/nodejs/node/pull/60860
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-01-17 20:15:02 +02:00
Nicholas Paun 24b16509d4 fs: fix errorOnExist behavior for directory copy in fs.cp
PR-URL: https://github.com/nodejs/node/pull/60946
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-01-17 17:52:38 +00:00
Heath Dutton🕴️ a00f5fea70 test_runner: fix coverage report when a directory is named file
The coverage tree traversal checked `tree[key].file` to detect file
entries. When a directory named "file" contained a file also named
"file", this check incorrectly matched the child entry instead of
file metadata, causing a TypeError when accessing `.path`.

Check for `.file?.path` instead to correctly identify file metadata.

Fixes: https://github.com/nodejs/node/issues/61080
PR-URL: https://github.com/nodejs/node/pull/61169
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-01-17 17:34:06 +00:00
Xavier Stouder a3ddfbe191 test_runner: print info when test restarts
When using spec reporter and running test in watch mode, print an info
message containing the current datetime when tests restart.

Fixes: https://github.com/nodejs/node/issues/57206
PR-URL: https://github.com/nodejs/node/pull/61160
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2026-01-17 17:33:57 +00:00
Moshe Atlow 8365edcbd0 test_runner: fix rerun ambiguous test failures
PR-URL: https://github.com/nodejs/node/pull/61392
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2026-01-17 14:02:35 +00:00
sangwook 13a662f559 fs: fix ENOTDIR in globSync when file is treated as dir
`fs.globSync` failed with `ENOTDIR` when a path component in a glob
pattern was a file but used as a directory (e.g., 'foo{,/bar}' when
'foo' is a file).

This change aligns `getDirentSync` with the asynchronous `getDirent`
by wrapping the `lstatSync` call in a `try-catch` block to safely
return `null` on such errors.

Fixes: https://github.com/nodejs/node/issues/61257
PR-URL: https://github.com/nodejs/node/pull/61259
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-01-17 13:33:55 +00:00
Daijiro Wachi 70ec5c009d meta: fix typos in issue template config
PR-URL: https://github.com/nodejs/node/pull/61399
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-17 11:14:31 +01:00
Eng Zer Jun 4f6759b738 doc: add deprecation history for url.parse
url.parse should document its deprecation history, following DEP0169,
for consistency.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61389
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-01-17 05:03:49 +00:00
Ruben Bridgewater 955d347884 assert,util: fix deep comparison for sets and maps with mixed types
When comparing a Set or a Map and they contain primitives as keys
as well as objects, the primitives would always be skipped. That
is not correct, since that may only be skipped in case all keys
are objects.

Fixes: https://github.com/nodejs/node/issues/61386
PR-URL: https://github.com/nodejs/node/pull/61388
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-01-17 01:12:45 +00:00
Vladimir Morozov aa98dd0b94 tools: fix vcbuild lint-js-build
PR-URL: https://github.com/nodejs/node/pull/61318
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-01-16 22:00:45 +00:00
Vas Sudanagunta e3071d52b6 test_runner: nix dead reporter code
reporter/utils.js formatTestReport:
1. hasChildren and showErrorDetails are never both true in
   existing calls.
2. Thus if hasChildren is true, showErrorDetails is false.
3. So `|| data.details?.error?.failureType === 'subtestsFailed'`
   is irrelevant.
4. And `\n${error}` never occurs.

Even though all tests pass after this commit, what if future reporter
code might make calls where both hasChildren and showErrorDetails
are true? I will address this in the last commit of this PR.
Trust me for now.

PR-URL: https://github.com/nodejs/node/pull/59700
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-01-16 17:48:44 +00:00
Vladimir Morozov 53b3c83ed4 node-api: use Node-API in comments
PR-URL: https://github.com/nodejs/node/pull/61320
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-01-16 16:00:54 +00:00
Joyee Cheung 3da4dce296 test: split test-esm-loader-hooks
Previously whenever one of the test case fails in the CI, it
barely logged anything useful in the CI and it was difficult to
nail down the specific failing case with a local reproduction,
especially when the test fixutre is inline JavaScript. This patch:

- Puts all the inline JavaScript in on-disk fixtures so that
  they can be re-run easily.
- Split the tests into individual files so that it's easier to nail
  down the failure
- Use spawnSyncAndAssert which logs useful information when the child
  process does not behave as expected.
- Rename the tests as module-hooks/test-async-loader-hooks-* because
  they belong to the module hooks test suite and are not esm-specific.

PR-URL: https://github.com/nodejs/node/pull/61374
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-01-13.md
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-16 14:30:12 +00:00
Marco Ippolito ae001bb4b7 doc: add marco and rafael in last sec release
PR-URL: https://github.com/nodejs/node/pull/61383
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-01-16 13:30:19 +00:00
Mert Can Altin 40958eb13a fs: remove duplicate fd validation in sync functions
PR-URL: https://github.com/nodejs/node/pull/61361
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-01-16 11:45:18 +00:00
jhofstee e74b42842e src: fix pointer alignment
The NgLibMemoryManager::ReallocImpl method prefixes the allocated
memory with its size, and returns a pointer to the region after it.
This pointer can however no longer be suitably aligned.

On Arm 32bits this resulted in unaligned accesses, since the NEON
vst1.64 instruction was used with a not properly aligned addresses.
A reproducer is available at [1].

Correct this by allocating the maximum of the the size of the size_t
and the max alignment.

[1] https://github.com/victronenergy/venus/issues/1559.

PR-URL: https://github.com/nodejs/node/pull/61336
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-01-16 11:45:08 +00:00
Stewart X Addison 8af6419395 test: aix: mark test-emit-on-destroyed as flaky
Signed-off-by: Stewart X Addison <sxa@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/61381
Refs: https://github.com/nodejs/node/issues/50245
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-16 11:16:59 +00:00
Taejin Kim 1155adbd23 typings: add typing for string_decoder
PR-URL: https://github.com/nodejs/node/pull/61368
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2026-01-16 01:14:30 +00:00
coderaiser 5f27b91aea doc: packages: example of private import switch to internal
PR-URL: https://github.com/nodejs/node/pull/61343
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-01-16 01:14:00 +00:00
Alfredo González a49053ad6d doc: add esm and cjs examples to node:v8
PR-URL: https://github.com/nodejs/node/pull/61328
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-01-16 01:13:39 +00:00
ikeyan 9b2ee5f197 doc: added 'secure' event to tls.TLSSocket
Fixes #61060

PR-URL: https://github.com/nodejs/node/pull/61066
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-16 01:13:29 +00:00
Mike McCready d73c49e849 build: drop support for Python 3.9
PR-URL: https://github.com/nodejs/node/pull/61177
Fixes: https://github.com/nodejs/node/issues/60919
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-01-15 23:14:19 +01:00
Node.js GitHub Bot cab20f2396 deps: update sqlite to 3.51.2
PR-URL: https://github.com/nodejs/node/pull/61339
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-01-15 21:57:02 +00:00
Jacob SmithandAlejandro Espa 538aebfa5d test_runner: support expecting a test-case to fail
Co-Authored-By: Alejandro Espa <98526766+vespa7@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/60669
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-01-15 22:55:01 +01:00
Yagiz Nizipli ec49a09bbb test: add webidl web-platform tests
PR-URL: https://github.com/nodejs/node/pull/61316
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
2026-01-15 16:51:10 +00:00
Xavier Stouder 1654684633 esm: ensure watch mode restarts after syntax errors
Move watch dependency reporting earlier in module resolution to ensure
file dependencies are tracked even when parsing fails.

Fixes: https://github.com/nodejs/node/issues/61153
PR-URL: https://github.com/nodejs/node/pull/61232
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2026-01-15 16:33:26 +00:00
Joyee Cheung 9575913f99 build: add embedtest into native suite
Instead of adding a separate command to run the embedtest, since
it's now run by the node binary via tools/test.py and
test/embedding/test-embedding.js, put embedding into the native
suite in test scripts. This helps adding more embedding tests
into the folder and run them automatically without listing them
one by one in the scripts.

PR-URL: https://github.com/nodejs/node/pull/61357
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-01-15 15:05:48 +00:00
Ryuhei Shima 2679b62e91 zlib: validate write_result array length
Fixes: https://github.com/nodejs/node/issues/61286
PR-URL: https://github.com/nodejs/node/pull/61342
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-01-15 00:38:09 +00:00
Daijiro Wachi 1409ac4ffb doc: restore @watilde to collaborators
Fixes: https://github.com/nodejs/TSC/issues/1813
PR-URL: https://github.com/nodejs/node/pull/61350
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-14 11:07:37 +00:00
Marco Ippolito b1ac7e49a4 doc: fix v25 changelog after security release
PR-URL: https://github.com/nodejs/node/pull/61371
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-14 10:39:26 +00:00
Marco Ippolito d4cc54b8c8 doc: fix v24 changelog after security release
PR-URL: https://github.com/nodejs/node/pull/61371
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-14 10:39:25 +00:00
Marco Ippolito 659fd01b3e doc: fix v22 changelog after security release
PR-URL: https://github.com/nodejs/node/pull/61371
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-14 10:39:24 +00:00
Marco Ippolito 6c96a63891 doc: fix v20 changelog after security release
PR-URL: https://github.com/nodejs/node/pull/61371
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-14 10:39:24 +00:00
Ryuhei Shima 903f64796e cluster: fix port reuse between cluster
Fixes: https://github.com/nodejs/node/issues/60086
PR-URL: https://github.com/nodejs/node/pull/60141
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-01-14 10:39:15 +00:00
github-actions[bot] abfad122f8 doc: run license-builder
PR-URL: https://github.com/nodejs/node/pull/61348
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-01-14 00:42:55 +00:00
Hardanish Singh b5bda89aa5 doc: clean up writing-and-running-benchmarks.md
PR-URL: https://github.com/nodejs/node/pull/61345
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-01-13 17:26:33 +00:00
Stewart X Addison daeafc06f9 src: use node- prefix on thread names
PR-URL: https://github.com/nodejs/node/pull/61307
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-01-13 16:57:11 +00:00
Сковорода Никита АндреевичandRafael Gonzaga 3cdb1cd437 src,lib: refactor unsafe buffer creation to remove zero-fill toggle
This removes the zero-fill toggle mechanism that allowed JavaScript
to control ArrayBuffer initialization via shared memory. Instead,
unsafe buffer creation now uses a dedicated C++ API.

Refs: https://hackerone.com/reports/3405778
Co-Authored-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/759
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2025-55131
2026-01-13 17:06:20 +01:00
Matteo Collina 97595f768e tls: route callback exceptions through error handlers
Wrap pskCallback and ALPNCallback invocations in try-catch blocks
to route exceptions through owner.destroy() instead of letting them
become uncaught exceptions. This prevents remote attackers from
crashing TLS servers or causing resource exhaustion.

Fixes: https://hackerone.com/reports/3473882
PR-URL: https://github.com/nodejs-private/node-private/pull/782
PR-URL: https://github.com/nodejs-private/node-private/pull/790
CVE-ID: CVE-2026-21637
2026-01-13 17:05:50 +01:00
RafaelGSS 1d2686d15e permission: add network check on pipe_wrap connect
Refs: https://hackerone.com/reports/3465156
PR-URL: https://github.com/nodejs-private/node-private/pull/784
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
CVE-ID: CVE-2026-21636
2026-01-13 17:02:37 +01:00
Matteo Collina 73747597e0 src: rethrow stack overflow exceptions in async_hooks
When a stack overflow exception occurs during async_hooks callbacks
(which use TryCatchScope::kFatal), detect the specific "Maximum call
stack size exceeded" RangeError and re-throw it instead of immediately
calling FatalException. This allows user code to catch the exception
with try-catch blocks instead of requiring uncaughtException handlers.

The implementation adds IsStackOverflowError() helper to detect stack
overflow RangeErrors and re-throws them in TryCatchScope destructor
instead of calling FatalException.

This fixes the issue where async_hooks would cause stack overflow
exceptions to exit with code 7 (kExceptionInFatalExceptionHandler)
instead of being catchable.

Fixes: https://github.com/nodejs/node/issues/37989
Ref: https://hackerone.com/reports/3456295
PR-URL: https://github.com/nodejs-private/node-private/pull/773
Refs: https://hackerone.com/reports/3456295
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-59466
2026-01-13 17:02:27 +01:00
RafaelGSS 3296b2e734 lib,permission: require full read and write to symlink APIs
Refs: https://hackerone.com/reports/3417819
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2025-55130
2026-01-13 17:02:08 +01:00
RafaelGSS 7d421c8f29 lib: add TLSSocket default error handler
This prevents the server from crashing due to an unhandled rejection
when a TLSSocket connection is abruptly destroyed during initialization
and the user has not attached an error handler to the socket.
e.g:

```js
const server = http2.createSecureServer({ ... })
server.on('secureConnection', socket => {
  socket.on('error', err => {
    console.log(err)
  })
})
```

PR-URL: https://github.com/nodejs-private/node-private/pull/750
Fixes: https://github.com/nodejs/node/issues/44751
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=3262404
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-59465
2026-01-13 17:01:42 +01:00
RafaelGSS fb4389332d lib: disable futimes when permission model is enabled
Refs: https://hackerone.com/reports/3390084
PR-URL: https://github.com/nodejs-private/node-private/pull/748
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-55132
2026-01-13 17:01:27 +01:00
RafaelGSS 6ea77ad552 2026-01-13, Version 25.3.0 (Current)
This is a security release.

Notable changes:

lib:
  * (CVE-2025-59465) add TLSSocket default error handler (RafaelGSS) https://github.com/nodejs-private/node-private/pull/750
permission:
  * (CVE-2026-21636) add network check on pipe_wrap connect (RafaelGSS) https://github.com/nodejs-private/node-private/pull/784
  * (CVE-2025-55130) require full read and write to symlink APIs (RafaelGSS) https://github.com/nodejs-private/node-private/pull/760
  * (CVE-2025-55132) disable futimes when permission model is enabled (RafaelGSS) https://github.com/nodejs-private/node-private/pull/748
src:
  * (CVE-2025-59466) rethrow stack overflow exceptions in async_hooks (Matteo Collina) https://github.com/nodejs-private/node-private/pull/773
src,lib:
  * (CVE-2025-55131) refactor unsafe buffer creation to remove zero-fill toggle (Сковорода Никита Андреевич) https://github.com/nodejs-private/node-private/pull/759
tls:
  * (CVE-2026-21637) route callback exceptions through error handlers (Matteo Collina) https://github.com/nodejs-private/node-private/pull/790

PR-URL: https://github.com/nodejs-private/node-private/pull/793
2026-01-13 14:45:46 +01:00