Commit Graph
49498 Commits
Author SHA1 Message Date
Node.js GitHub Bot 8f878271e8 deps: patch V8 to 15.6.75.60
Refs: https://github.com/v8/v8/compare/15.6.75.50...15.6.75.60
2026-11-15 00:41:25 +00:00
Geoffrey Booth cb05e4d0c2 module: remove async module customization hooks
Remove `module.register()` (DEP0205), the `--experimental-loader` and
`--loader` flags, and the machinery that supported them: the loader
hooks worker thread, the hooks proxy, the async module customization
hook chains for resolving and loading, the internal worker class used to
run the loader thread, and the asynchronous module job linking. Module
customization is now provided only by `module.registerHooks()`, which
runs synchronously on the thread that loads the modules.

As the loader thread no longer exists, the ES module loader always loads
and links modules synchronously, so the code that handled promises and
the re-invented `require()` for imported CommonJS customized by the
async module customization hooks is removed too. `import()` still defers
evaluation of the module to a later microtask, as before.

`worker_threads.isInternalThread` is kept for compatibility and is now
always `false`; removing it is left for a future semver-major change.

The `ERR_ASYNC_LOADER_REQUEST_NEVER_SETTLED` and
`ERR_LOADER_CHAIN_INCOMPLETE` error codes are no longer used and are
documented as removed.

Tests that exist only to exercise the async module customization hooks
are removed.

Assisted-by: Claude
Signed-off-by: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: https://github.com/nodejs/node/pull/67090
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-11-14 21:51:46 +00:00
Lily Chen dd23cd248c crypto: use const STACK_OF(SSL_CIPHER)* for SSL_get_ciphers
BoringSSL is updating SSL_get_ciphers and SSL_CTX_get_ciphers to return
const STACK_OF(SSL_CIPHER)* instead of a non-const pointer. Declare the
local ciphers variable in SSLPointer::getCiphers as const so it builds
cleanly against both OpenSSL and BoringSSL.

Refs: https://crbug.com/550501994
Signed-off-by: Lily Chen <chlily@google.com>
PR-URL: https://github.com/nodejs/node/pull/67443
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 21:25:02 +00:00
Filip Skokan bd08ba304e crypto: throw on X509Certificate operation errors
X509Certificate can report failed operations as missing fields or
negative checks. Invalid validity times return "Bad time value" or
Invalid Date, making relational date comparisons return false.

Throw when required fields cannot be converted, certificate encoding or
fingerprint calculation fails, or a present AIA or EKU extension cannot
be decoded. Apply this to getters and explicit toLegacyObject() calls.
Report failed or unsupported private-key comparisons as exceptions.

For verify(), return true for 1 and false for 0. Also return false for a
wrong key type or invalid unused bits in the signature BIT STRING.
Throw for other negative results.

Use the existing conversion behavior for legacy TLS certificate objects,
which are also constructed internally during handshakes. Formatting
unrelated metadata must not cause an uncaught exception or reject an
otherwise valid connection.

Fixes: https://github.com/nodejs/node/issues/67285
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/67408
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 18:00:51 +00:00
Daniel Cavalcante 0b4d0ac5a2 vfs: add callback readv and writev handlers
A mounted VFS causes callback readv and writev to call missing
handlers, breaking both virtual and real file descriptors.

Add both handlers while preserving I/O for real descriptors.

Signed-off-by: Daniel Cavalcante <dcavalcante@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66548
Fixes: https://github.com/nodejs/node/issues/66532
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 16:01:59 +00:00
Antoine du Hamel 3f8e1f5a36 doc: add aduh95 as last security release stewards
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67434
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 11:33:34 +00:00
Lazizbek Ergashev 52bfcaf572 tls: pop errors from failed session parsing
Signed-off-by: lazerg <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67212
Fixes: https://github.com/nodejs/node/issues/67204
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 08:07:22 +00:00
Christian Aurich Zanettini Martins 7996b180af stream: close Utf8Stream fd after pending write
destroy() fsynced and closed the fd right away, even while an
fs.write() on it was still running on the thread pool. The write then
failed with EBADF, emitted as an 'error' that crashed the process when
nothing listened for it, or landed in whatever file reused the fd
number.

Close the fd once the in-flight write completes, as fs.WriteStream
does. Data buffered behind it is still dropped, so 'finish' is not
emitted in that case.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67355
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-11-09.md
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 08:07:11 +00:00
Matteo Collina 291d62f885 stream: drop rejection step for sync transforms
transformStreamDefaultControllerPerformTransform chained a rejection
step onto the result of every transform() call. A non-thenable result
cannot reject, so return the shared resolved promise directly and save
a promise allocation and a microtask per chunk.

The write promise of a transform whose transform() returns a
non-thenable now settles one microtask earlier than in the reference
implementation. The relative order of all stream events is unchanged.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/67339
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 07:55:28 +00:00
Orgad Shaneh 6368e00e91 src: give small stream reads their own buffer
Every read was carved out of the env-wide 64KB StreamReadSlab and
handed to JS as a view over it. TLS asks for exactly the decrypted
size, so the copy-on-waste path in Commit() never triggers, and any
TLS chunk that JS keeps pins the whole slab and every other read in
it. Chunks queued for seconds (e.g. audio streamed faster than real
time) get the slabs promoted, and their external memory then drives
most major GCs.

Reads asking for less than a slab now get a right-sized managed
buffer, as before the slab existed. Large reads (plain TCP, where
libuv suggests 64KB) still use the slab.

Assisted-by: Claude Code
Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
PR-URL: https://github.com/nodejs/node/pull/67327
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-14 06:25:03 +00:00
Yuya Inoue f8ab6107a4 http2: send deferred RST_STREAM on stream destroy
close() with NO_ERROR waits for 'finish' before sending RST_STREAM.
If the body is stuck behind flow control and the stream is destroyed
first, RST_STREAM is never sent and nghttp2 keeps the stream open.
On the next WINDOW_UPDATE, OnRead finds no stream and returns 0
without EOF, so nghttp2 sends empty DATA frames until OOM. Both
client and server streams are affected.

Send the deferred RST_STREAM in _destroy(). As a backstop, return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE from OnRead when the stream is
gone, which nghttp2 documents as the way to reset a stream on error.

Fixes: https://github.com/nodejs/node/issues/67363
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67372
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-11-14 05:16:17 +00:00
Trevor Burnham 530b8e3a98 meta: update Trevor Burnham's email in .mailmap
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67425
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-11-14 01:47:08 +00:00
Trevor Burnham b5e3a61db3 doc: explain how sqlite binds numbers and BigInts
A JavaScript number is always bound with sqlite3_bind_double(), so it is
written as REAL even when it has no fractional part. A BigInt is bound
with sqlite3_bind_int64() and is the way to write an INTEGER. The type
conversion table listed number under both INTEGER and REAL without
saying which applies when, so the rule had to be discovered by
experiment.

Column type affinity hides this most of the time, which is why the cases
it does not cover are surprising. Comparing against a TEXT column is the
worst of them: the number 3 compares as '3.0' and silently fails to
match a stored '3', with no error to point at the cause. Document the
rule, the reason for it, and that case, and remove number from the
table's INTEGER row. Point the virtual table section's link at the new
text.

better-sqlite3 binds numbers the same way and has fielded the same
question repeatedly (WiseLibs/better-sqlite3#165, #627, #897, #1144,
#1313), each time closed as working as intended.

Fixes: https://github.com/nodejs/node/issues/63826
Refs: https://github.com/WiseLibs/better-sqlite3/issues/627
Assisted-by: Claude Opus 5.5
Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67424
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
2026-11-14 01:37:10 +00:00
Chengzhong Wu dadf02907a src: adopt FallthroughCallback signature of Dispatchable
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/66653
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-13 20:16:37 +00:00
Node.js GitHub Bot 12b4c387fe deps: update inspector_protocol to c0045057ce801744c5e88596a2f1bab1802e
PR-URL: https://github.com/nodejs/node/pull/66653
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2026-11-13 20:16:36 +00:00
Matteo Collina 726d4d4b00 src: restore tty state on exit only if changed
ResetStdio() unconditionally writes the terminal attributes recorded at
startup back to stdin and stderr when the process exits, even when the
process never touched the terminal. This clobbers changes made in the
meantime by another process sharing the terminal: in `node -h | less`,
less switches the terminal to raw mode once it receives the first byte
of output, and node switches it back to cooked mode when it exits.

Only restore the recorded attributes when node itself changed the
terminal mode through setRawMode(), or when exiting because of a signal.
Restoring the O_NONBLOCK flag and libuv's own terminal mode reset are
unchanged.

Fixes: https://github.com/nodejs/node/issues/66440
Refs: https://github.com/nodejs/node/issues/35536
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66753
Refs: https://github.com/nodejs/node/pull/66540
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2026-11-13 20:16:19 +00:00
René 40b49b6c6b deps: V8: backport a05177279022
Original commit message:

    [temporal] Compute zoneinfo64.res length from ResB index table

    ICU4C's offsetTOCLookupFn sets UDataMemory::length = -1 for the last
    entry in a .dat archive (which occurs for zoneinfo64.res in small-icu
    builds where zu.res is excluded), and pointerTOCLookupFn sets length = -1
    for all entries in pointer TOC builds.

    When UDataMemory::length is -1, compute the bundle byte length from the
    ResB header offset (udata_getMemory(memory) - data) and the
    self-describing URES_INDEX_BUNDLE_TOP word in the ResB index table,
    matching ICU4C's res_init() in uresdata.cpp. Also check USING_SYSTEM_ICU
    in addition to V8_ENABLE_TEMPORAL_SYSTEMICU when deciding whether
    internal udatamem.h is available.

    Bug: 576986967
    Change-Id: I7a2c881eb3891a97eafb244f71aa405ff2434b51
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8642579
    Commit-Queue: Manish Goregaokar <manishearth@google.com>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#111181}

Refs: https://github.com/v8/v8/commit/a0517727902272117b79281998dc0d5d4da0fa49
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67416
Refs: https://issues.chromium.org/issues/576986967
Refs: https://github.com/nodejs/node/issues/62676
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Steven R Loomis <srl295@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-13 17:20:54 +00:00
Roberto Bianchi 02ad8f22f2 util: use indexed writes for inspected object properties
Avoid the cost of primordial push calls for each formatted property.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/67297
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-11-13 17:11:04 +00:00
Yuya Inoue 925faf48f9 test: deflake test-watch-mode-files_watcher
Some test cases made a single change right after creating a watcher.
On macOS, libuv starts the FSEvents stream asynchronously, so that
change could be missed and the test hung until it timed out.

Keep making the change until the watcher reports it, as the other
cases in the file already do.

Refs: https://github.com/nodejs/reliability/issues/1715
Refs: https://github.com/nodejs/reliability/issues/1644
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67298
Refs: https://github.com/nodejs/node/actions/runs/42177414954
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-13 10:25:49 +00:00
Sarthak Ahuja 11d74515f2 doc: document invalid X509Certificate validity times
When a certificate's notBefore or notAfter time cannot be parsed,
validFrom and validTo return the string 'Bad time value', and
validFromDate and validToDate return an invalid Date. Relational
comparisons with an invalid Date are always false, so a naive expiry
check can treat such a certificate as valid. Document the current
behavior and tell callers to reject invalid dates first.

Signed-off-by: Sarthak Ahuja <39986642+SarthakAhuja@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67406
Refs: https://github.com/nodejs/node/issues/67285
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-13 09:18:44 +00:00
René 71fd959039 tools: update mk-ca-bundle to 1.35
Adds the facility to ignore root certificates by fingerprint using
mk-ca-bundle's -x parameter.

Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/67403
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-13 07:28:41 +00:00
James M Snell c905bedc90 lib: avoid dead code elimination with node:bench
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:53 +00:00
James M Snell e256fcb78b lib: add gc options to node:bench
Adds option post-warmup and pre-sample gc options
to node:bench

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:52 +00:00
James M Snell e3499df9b4 lib: default bench operations to 1
b.end(N) ... N defaults to 1
b.report(...) operations defaults to 1

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:51 +00:00
James M Snell 7a38815076 lib: update node:bench reporters to include sys info
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-13 03:50:49 +00:00
Farid Zakaria 7b4c9e30ee test: deflake watch mode test for missing env file
The subtest watched all of tmpdir, so files created there by the
subtests running alongside it restarted the child and broke its
output. The fix is to watch a directory of its own instead to not
conflict.

Refs: https://github.com/nodejs/node/pull/66232
Assisted-by: Claude
Signed-off-by: Farid Zakaria <farid.m.zakaria@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67041
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
2026-11-12 22:19:40 -03:00
Emerson Gomes 6728a1cfe0 http2: flush final GOAWAY after pending writes
Keep the native close pending when an active socket write prevents the
terminal GOAWAY from being serialized. Finish the close after the
outgoing buffers become available, preserving the requested error code.

Handle synchronous completion and transport errors without retrying
writes to a failed transport or losing the socket close notification.

Add a deterministic regression for default and custom GOAWAY codes, both
inside and outside the receive callback.

Fixes: https://github.com/nodejs/node/issues/66832
Assisted-by: Codex
Signed-off-by: Emerson Gomes <emerson.gomes@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66834
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 21:07:37 +00:00
Manjeet Singh 4ad8171344 doc: explain fallback arrays in package exports targets
The "exports" field type lists `string[]`, but the packages
documentation never describes how an array of targets is resolved.
Document that items are tried in order, that only invalid targets and
unmatched conditions are skipped, and that a missing file does not
cause the next item to be tried.

Fixes: https://github.com/nodejs/node/issues/58600
Signed-off-by: Manjeet Singh <024manjeetsingh@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67393
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2026-11-12 21:07:25 +00:00
fatih f4e89e70dd inspector: disconnect handles before releasing interfaces
Disconnect the thread handle while NodeInspectorClient still owns the
interface. This prevents cross-thread posts from calling
shared_from_this() after the interface's last strong reference has been
released.

Add a regression test verifying handle expiration during owner teardown.

Fixes: https://github.com/nodejs/node/issues/67079
Signed-off-by: Fatih Güzel <fatihguzeldev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67281
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-11-12 19:15:20 +00:00
Antoine du Hamel 67e45e4a87 tools: enable strict mode for yamllint
Treats warnings as errors, so we can detect regressions.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67380
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-11-12 15:39:25 +00:00
Stewart X Addison 6b0cfafe65 test: increase iterations on histogram test after snapshot changes
Signed-off-by: Stewart X Addison <sxa@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/67379
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-11-12 14:41:07 +00:00
Node.js GitHub Bot 4f23168685 2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha)
Notable changes:

child_process:
  * (SEMVER-MINOR) add subprocess.timedOut (Marco) https://github.com/nodejs/node/pull/66639
crypto:
  * (SEMVER-MINOR) make X.509 inspection guards explicit (Filip Skokan) https://github.com/nodejs/node/pull/67245
  * (SEMVER-MINOR) add X.509 generation with CSR support (Filip Skokan) https://github.com/nodejs/node/pull/67245
dns:
  * (SEMVER-MINOR) coalesce identical concurrent lookup() requests (Orgad Shaneh) https://github.com/nodejs/node/pull/62599
doc:
  * add efekrskl to collaborators (Efe Karasakal) https://github.com/nodejs/node/pull/67376
  * add Philipp Dunkel to contributors (Philipp Dunkel) https://github.com/nodejs/node/pull/67378
  * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) https://github.com/nodejs/node/pull/67377
http:
  * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) https://github.com/nodejs/node/pull/67187
sea:
  * (SEMVER-MINOR) generate a compile cache for the VFS modules (Matteo Collina) https://github.com/nodejs/node/pull/66768
worker:
  * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) https://github.com/nodejs/node/pull/66311

PR-URL: https://github.com/nodejs/node/pull/67415
2026-11-12 14:31:58 +01:00
Robert I Nilsson 8aa19d23d1 doc: document this binding in TLS callbacks
Document that `this` is bound to the `tls.TLSSocket` instance
when `SNICallback` and `ALPNCallback` are invoked.

Signed-off-by: Robert I Nilsson <robert.i.nilsson@callclue.com>
PR-URL: https://github.com/nodejs/node/pull/66682
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-12 11:25:07 +01:00
Ved Chaudhari 933cb117c9 fs: restore stack traces of fs/promises readFile and writeFile errors
Errors from readFile(), writeFile() and appendFile() have had no stack
frames since they started using a single thread pool round trip, as
the stack was captured from a C++ callback with no JS frames on it.
Capture it after the await instead, like the rest of fs/promises.

Refs: https://github.com/nodejs/node/pull/65327
Refs: https://github.com/nodejs/node/pull/65489
Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <vedc2853@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66757
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-11 22:15:53 +00:00
Node.js GitHub Bot 50ce73fe07 deps: update nghttp3 to 1.19.0
PR-URL: https://github.com/nodejs/node/pull/67333
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-11 17:21:27 +00:00
Antoine du Hamel c207dbf0a2 2026-11-11, Version 26.13.1 'Lithium' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-123863) http2: release headers when a stream is removed (Matteo Collina) – High
* (CVE-2026-123864) tls,http: prevent nested parser execution from empty writes (Matteo Collina) – High
* (CVE-2026-123865) http2: detect streams abandoned by nghttp2 (Matteo Collina) – High
* (CVE-2026-123866) http2: retain buffers until socket writes finish (Matteo Collina) – High
* (CVE-2026-123872) tls: disable resumption for mTLS with no session id context (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow renegotiation or HRR to change SNI (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow TLS resumption to change SNI (Tim Perry) – High
* (CVE-2026-123874) http2: retain streams during pending writes (Matteo Collina) – High
* (CVE-2026-126051) tls: fix remotely reachable TLS server crash (Tim Perry) – High
* (CVE-2026-123828) http2: avoid overflowing ALTSVC buffers (Matteo Collina) – Medium
* (CVE-2026-123867) tls: apply the CA of SNI contexts without a certificate (Matteo Collina) – Medium
* (CVE-2026-123868) http2: charge inbound DATA retained by streams to maxSessionMemory (Matteo Collina) – Medium
* (CVE-2026-123871) http: redact proxy credentials in invalid proxy URL errors (Matteo Collina) – Medium
* (CVE-2026-123875) http2: guard against null write request on cancelled stream (Matteo Collina) – Medium
* (CVE-2026-123877) https: isolate Agent TLS policy keys (Matteo Collina) – Medium
* (CVE-2026-123829) permission: do not leak denied descendants in recursive fs.watch (RafaelGSS) – Low
* (CVE-2026-123862) zlib: handle params callback after destroy (Matteo Collina) – Low
* (CVE-2026-123873) permission: check heap snapshot destination (RafaelGSS) – Low
* deps: update brotli to 1.2.1 (Node.js GitHub Bot)
* deps: update llhttp to 9.4.4 (Antoine du Hamel)
* deps: update sqlite to 3.54.1 (Node.js GitHub Bot)
* deps: update undici to 8.12.4 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1050
2026-11-11 17:33:40 +01:00
Antoine du Hamel 0d636a2dde 2026-11-11, Version 24.22.3 'Krypton' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-123863) http2: release headers when a stream is removed (Matteo Collina) – High
* (CVE-2026-123864) tls,http: prevent nested parser execution from empty writes (Matteo Collina) – High
* (CVE-2026-123865) http2: detect streams abandoned by nghttp2 (Matteo Collina) – High
* (CVE-2026-123866) http2: retain buffers until socket writes finish (Matteo Collina) – High
* (CVE-2026-123872) tls: disable resumption for mTLS with no session id context (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow renegotiation or HRR to change SNI (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow TLS resumption to change SNI (Tim Perry) – High
* (CVE-2026-123874) http2: retain streams during pending writes (Matteo Collina) – High
* (CVE-2026-126051) tls: fix remotely reachable TLS server crash (Tim Perry) – High
* (CVE-2026-123828) http2: avoid overflowing ALTSVC buffers (Matteo Collina) – Medium
* (CVE-2026-123867) tls: apply the CA of SNI contexts without a certificate (Matteo Collina) – Medium
* (CVE-2026-123868) http2: charge inbound DATA retained by streams to maxSessionMemory (Matteo Collina) – Medium
* (CVE-2026-123871) http: redact proxy credentials in invalid proxy URL errors (Matteo Collina) – Medium
* (CVE-2026-123875) http2: guard against null write request on cancelled stream (Matteo Collina) – Medium
* (CVE-2026-123877) https: isolate Agent TLS policy keys (Matteo Collina) – Medium
* (CVE-2026-123829) permission: do not leak denied descendants in recursive fs.watch (RafaelGSS) – Low
* (CVE-2026-123862) zlib: handle params callback after destroy (Matteo Collina) – Low
* (CVE-2026-123873) permission: check heap snapshot destination (RafaelGSS) – Low
* deps: update brotli to 1.2.1 (Node.js GitHub Bot)
* deps: update llhttp to 9.4.4 (Antoine du Hamel)
* deps: update sqlite to 3.54.1 (Node.js GitHub Bot)
* deps: update undici to 7.30.2 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1051
2026-11-11 17:33:40 +01:00
Antoine du Hamel f4f5a3d62d 2026-11-11, Version 22.23.5 'Jod' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-123863) http2: release headers when a stream is removed (Matteo Collina) – High
* (CVE-2026-123864) tls,http: prevent nested parser execution from empty writes (Matteo Collina) – High
* (CVE-2026-123865) http2: detect streams abandoned by nghttp2 (Matteo Collina) – High
* (CVE-2026-123866) http2: retain buffers until socket writes finish (Matteo Collina) – High
* (CVE-2026-123872) tls: disable resumption for mTLS with no session id context (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow renegotiation or HRR to change SNI (Tim Perry) – High
* (CVE-2026-123872) tls: don't allow TLS resumption to change SNI (Tim Perry) – High
* (CVE-2026-123874) http2: retain streams during pending writes (Matteo Collina) – High
* (CVE-2026-123828) http2: avoid overflowing ALTSVC buffers (Matteo Collina) – Medium
* (CVE-2026-123867) tls: apply the CA of SNI contexts without a certificate (Matteo Collina) – Medium
* (CVE-2026-123868) http2: charge inbound DATA retained by streams to maxSessionMemory (Matteo Collina) – Medium
* (CVE-2026-123871) http: redact proxy credentials in invalid proxy URL errors (Matteo Collina) – Medium
* (CVE-2026-123875) http2: guard against null write request on cancelled stream (Matteo Collina) – Medium
* (CVE-2026-123877) https: isolate Agent TLS policy keys (Matteo Collina) – Medium
* (CVE-2026-123829) permission: do not leak denied descendants in recursive fs.watch (RafaelGSS) – Low
* (CVE-2026-123862) zlib: handle params callback after destroy (Matteo Collina) – Low
* (CVE-2026-123873) permission: check heap snapshot destination (RafaelGSS) – Low
* deps: update llhttp to 9.4.4 (Antoine du Hamel)
* deps: update sqlite to 3.54.1 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1052
2026-11-11 17:33:40 +01:00
Tim Perry 633df2896f tls: fix remotely reachable TLS server crash
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1018
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
CVE-ID: CVE-2026-126051
2026-11-11 17:33:40 +01:00
Matteo Collina 0d6d38f1e5 http2: retain streams during pending writes
Native file responses create write requests without a JS reference to
the Http2Stream wrapper. Resetting a stream while its socket write is
pending could let GC delete the stream before WriteWrap::OnDone().

Keep a strong stream reference with each outgoing DATA buffer until the
underlying write completes.

Assisted-by: codex:gpt-5.6-sol
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1040
Refs: https://hackerone.com/reports/4150891
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
CVE-ID: CVE-2026-123874
2026-11-11 17:33:39 +01:00
Matteo Collina 3f3c59317e http2: charge inbound DATA retained by streams to maxSessionMemory
Inbound DATA frames delivered to JS while a stream is paused are
retained in the stream's readable buffer until the application reads
them. These were not counted against the session's maxSessionMemory, so
a peer could send many tiny DATA frames on a stream the application is
not draining and make the session retain an unbounded amount of memory,
in proportion to the number of frames rather than the bytes sent.

Charge each such DATA chunk (plus a per-chunk overhead comparable to the
Buffer view bookkeeping) against maxSessionMemory, and release it when
the stream resumes reading (ReadStart) or is destroyed (RemoveStream).
Add connection-level backpressure so the session stops reading from the
socket once it can no longer afford the inbound queued data, resuming
when the application consumes it.

Refs: https://hackerone.com/reports/4089663
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1000
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123868
2026-11-11 17:33:39 +01:00
RafaelGSS ab6a046cc2 permission: do not leak denied descendants in recursive fs.watch
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/967
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123829
2026-11-11 17:33:39 +01:00
Tim Perry 5ebf6adc4b tls: disable resumption for mTLS with no session id context
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123872
2026-11-11 17:33:39 +01:00
Tim Perry 42213da8fd tls: don't allow renegotiation or HRR to change SNI
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123872
2026-11-11 17:33:39 +01:00
Tim Perry ae94cd890a tls: don't allow TLS resumption to change SNI
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123872
2026-11-11 17:33:39 +01:00
Matteo Collina 20fd568f00 https: isolate Agent TLS policy keys
Encode TLS option types and values in HTTPS Agent keys so distinct trust
and identity policies cannot share sockets or cached sessions. Assign
stable identities to opaque SecureContext and callback objects.

Refs: https://hackerone.com/reports/3946081

Assisted-by: codex:gpt-5.6-sol
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1036
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123877
2026-11-11 17:33:39 +01:00
Matteo Collina 519c65ec6a http: redact proxy credentials in invalid proxy URL errors
The earlier fix to redact proxy credentials only covered the tunnel
error and the ProxyConfig.href property. Four other error paths still
interpolate the raw proxy URL, credentials included, into
ERR_PROXY_INVALID_CONFIG messages:

* lib/internal/http.js - ProxyConfig constructor when new URL() fails.
* lib/internal/http.js - parseProxyUrl when the URL contains CR or LF.
* lib/http.js - setGlobalProxyFromEnv() with an unparseable http_proxy.
* lib/http.js - setGlobalProxyFromEnv() with an unparseable https_proxy

Add a redactProxyUrl() helper that strips userinfo when parsing
succeeds and falls back to a textual strip for the unparseable cases
that reach the vulnerable paths, then route all four sites through it.

Refs: https://hackerone.com/reports/3966924
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1001
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
CVE-ID: CVE-2026-123871
2026-11-11 17:33:39 +01:00
Matteo Collina 9c6e6efa33 http2: retain buffers until socket writes finish
Partial writes can leave slices of a stream's queued buffers in the
session's outgoing write. Destroying the stream completes the original
write request and allows those buffers to be collected while the socket
still references them.

Retain a non-completing reference to the write request for each queued
buffer and propagate it to partial slices.

Assisted-by: pi
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1017
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123866
2026-11-11 17:33:38 +01:00
Matteo Collina a69953c0c1 tls: apply the CA of SNI contexts without a certificate
`CertCbDone()` only installed an SNI context's CA store and client CA
list when `setSniContext()` succeeded, which requires the context to
have a certificate. A context added with `server.addContext(host,
{ ca })` was therefore ignored for client certificate verification,
and clients for that host were verified against the default context's
CA instead.

Apply the SNI context's CA whenever it configured one through
`addCACert()`, even without a certificate. A context with neither a
certificate nor its own CA still keeps the default trust store, rather
than switching to the bundled root certificates. Also report a failure
of `setSniContext()` instead of silently continuing with the default
credentials.

Refs: https://hackerone.com/reports/4103553
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1020
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123867
2026-11-11 17:33:38 +01:00
Matteo Collina 5d6dedb3a6 http: never execute llhttp re-entrantly
llhttp is not reentrant: it keeps its position in the input in the
parser state and only updates it when `llhttp_execute()` returns.
Instead of supporting nested calls, make sure that llhttp never runs
inside itself.

- `socketOnData` on the server and the client puts data that arrives
  while the parser is executing back into the socket, and resumes the
  socket after the current call.
- `Parser::Execute()` does not run llhttp while it is already running.
  A nested call with data fails the outer call with
  `HPE_REENTRANT_EXECUTE`. A nested `finish()`, which comes from
  tearing down the connection in a callback, is skipped.

This replaces the buffer bounds check on data callbacks.

Refs: https://hackerone.com/reports/4150886
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1021
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123864
2026-11-11 17:33:38 +01:00