49482 Commits
Author SHA1 Message Date
Antoine du Hamel 932169277e Working on v27.0.0-alpha.0.1.2
PR-URL: https://github.com/nodejs/node/pull/67515
2026-11-17 00:31:34 +01:00
Node.js GitHub Bot 6c7c89331d 2026-11-16, Version 27.0.0-alpha.0.1.1 (Alpha)
Notable changes:

tools:
  * notarize `bin/node` in the darwin tarballs (Ulises Gascón) https://github.com/nodejs/node/pull/67143

PR-URL: https://github.com/nodejs/node/pull/67515
v27.0.0-alpha.0.1.1
2026-11-16 11:23:16 +01:00
Yao Zi aa0572bada build: do not include vendored simdutf with --shared-simdutf
Do not include the vendored simdutf when compiling merve if shared
simdutf is used to ensure the headers match the linked library.

Signed-off-by: Yao Zi <me@ziyao.cc>
PR-URL: https://github.com/nodejs/node/pull/67410
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-16 11:03:07 +01:00
Antoine du Hamel 70d8236efe tools: add support for multiple-commit PRs in review_backport.sh
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67108
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-11-16 11:03:07 +01:00
Ultron 7c6dd81da3 doc: fix typo in releases.md
Signed-off-by: Ultroncn <82553854+Ultroncn@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/67463
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-11-16 11:02:59 +01:00
Chengzhong Wu a5672e8023 build: enable pie on linux
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/67386
Refs: https://github.com/nodejs/node/issues/66951
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-11-16 10:14:33 +01:00
Ulises Gascón e0c71bcd1c tools: notarize bin/node in the darwin tarballs
The binary tarball target only codesigns bin/node. Notarization runs
only for the pkg, and tools/osx-notarize.sh only knows how to submit a
pkg, so every darwin tarball binary ships signed but without a ticket.
Gatekeeper then applies a full trust evaluation to each process spawned
through it, which slows down every CLI shim on macOS.

Make tools/osx-notarize.sh take a path instead of a version id. A .pkg
keeps the existing flow. Any other file is treated as a Mach-O binary:
it is zipped with ditto, submitted with notarytool, and the ticket is
verified with `codesign --verify -R=notarized` using the existing retry
helper. spctl cannot be used for that check, it rejects command line
tools as "not an app". The binary itself is not modified, so published
checksums do not change. A bare version id is still accepted and
resolved to node-<version>.pkg for the release branches.

Call the script from the binary target after codesign. It is a no-op
unless the NOTARIZATION_* variables are exported, so the tarball jobs
keep behaving as today until the release job injects them.

Refs: https://github.com/nodejs/node/issues/67140
Refs: https://github.com/nodejs/build/issues/3538
Refs: https://github.com/nodejs/build/issues/4545
Refs: https://github.com/nodejs/node/pull/66855
Assisted-by: Claude
Assisted-by: Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67143
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2026-11-16 10:14:33 +01:00
Livia Medeiros 17be7f1efc test: use relative paths within test directory in test-watch-mode.mjs
Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67343
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-11-16 10:14:33 +01:00
Christian Aurich Zanettini Martins 5d51de3db7 test: deflake test-tls-resume-servername
The PSK server's pskCallback answered every identity, but OpenSSL also
asks it about the resumption ticket, cut at its first NUL byte. When
that prefix is valid UTF-8, about 1% of the time, the ticket was taken
for an external PSK and the handshake failed with decrypt_error. Only
answer for the identity the client sends.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67450
Refs: https://github.com/nodejs/reliability/issues/1722
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-11-16 10:14:33 +01:00
Christian Aurich Zanettini Martins e3caf971c1 test: deflake test-fs-stat-cancel-inflight under FIPS
The pbkdf2() call that keeps the only threadpool worker busy used a
6-byte password and a 4-byte salt. OpenSSL 4 FIPS rejects those, so
the derivation failed at once and freed the worker. The queued stat
could then start before req.cancel() ran, and it completed without
ECANCELED.

Use inputs that meet the FIPS minimums and check that the derivation
succeeds.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67449
Refs: https://github.com/nodejs/node/pull/67248
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-16 10:14:33 +01:00
Antoine du Hamel 9fda0620f2 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-16 10:14:33 +01:00
Trevor Burnham 1a1489838c 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-16 10:14:32 +01:00
Trevor Burnham a23a18b8e5 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-16 10:14:32 +01:00
René cfb550171d 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-16 10:10:11 +01:00
Yuya Inoue 098b4788ca 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-16 10:09:56 +01:00
Sarthak Ahuja 136ae6f518 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-16 10:09:56 +01:00
René 67d57cfef1 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-16 10:09:56 +01:00
Farid Zakaria b2f17a3732 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-16 10:09:56 +01:00
Manjeet Singh e396cb0bb3 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-16 10:09:55 +01:00
Antoine du Hamel 8dfdbb540e 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-16 10:09:55 +01:00
Stewart X Addison 5aac327abd 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-16 10:09:55 +01:00
Robert I Nilsson 3c930d22ea 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-16 10:09:55 +01:00
Node.js GitHub Bot a92ee337b1 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-16 10:09:46 +01:00
Austin BurdineandAntoine du Hamel f775f92e2e deps: V8: backport 2444c109f4f8
Original commit message:

    [heap] Treat zero allocation throughput as a low allocation rate

    Since https://crrev.com/c/5935313 allocation throughput is tracked with
    SmoothedBytesAndDuration, which has no lower bound. A sampled throughput
    of exactly 0 -- nothing was allocated, or the smoothed value decayed to
    0 after a long idle period -- made ComputeMutatorUtilizationImpl()
    return a mutator utilization of 0 ("maximal allocation"). For an isolate
    that never allocates on the CppHeap, HasLowAllocationRate() is then
    never true and the MemoryReducer cannot start a GC through its
    low-allocation condition; only the 100s watchdog can. Node.js hits this
    for any process that does not use node:vm.

    Remove the special case. A mutator speed of 0 now yields a mutator
    utilization of 1, i.e. the lowest possible allocation rate. gc_speed is
    either the conservative default or at least 1 byte/ms, so the formula
    stays well defined.

    Bug: 570738027
    Change-Id: I84cd51607df3c31c2f1e02bb2fe258e5506131ce
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8521518
    Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Omer Katz <omerkatz@chromium.org>
    Commit-Queue: Omer Katz <omerkatz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110599}

Refs: https://github.com/v8/v8/commit/2444c109f4f8165024971e15b12eb4611b4cd676
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66736
2026-11-14 17:07:24 +01:00
Dominik Inführ a4787636cb deps: V8: cherry-pick 497c2e6a2434
Original commit message:

    [heap] Always decrement age in RetainMaps()

    When the prototype and constructor were already marked we did not
    age the map because of the assumption that this would only keep the
    transition tree alive. However, this does not hold because of
    the JSFunctions inside an AccessorPair in DescriptorArray.

    This can result in retaining maps indefinitely when not triggering
    memory reducing GCs. This CL therefore simplifies the code to
    always age maps instead. This is neutral on Speedometer and Jetstream.

    Bug: 571157135
    Change-Id: I8fb633a0ec0c1d66e4596390ca48e1c7006c9cc2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8557820
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110622}

Refs: https://github.com/v8/v8/commit/497c2e6a2434af02b44417b55b1576702922f5e9
PR-URL: https://github.com/nodejs/node/pull/66728
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-14 17:01:52 +01:00
Antoine du Hamel 66785ecfdf Working on v27.0.0-alpha.0.1.1
PR-URL: https://github.com/nodejs/node/pull/67415
2026-11-12 14:31:41 +01:00
Node.js GitHub Bot dd138afdd6 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
v27.0.0-alpha.0.1.0
2026-11-11 12:12:10 -05:00
Tim Perry f1cb89b976 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:59:42 +01:00
Matteo Collina a947ae418e 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:59:42 +01:00
Matteo Collina e766c3db0e 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:59:42 +01:00
RafaelGSS 5e1dad2e15 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:59:42 +01:00
Tim Perry 3fa5ee2923 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:59:42 +01:00
Tim Perry 1ddeffb2f8 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:59:42 +01:00
Tim Perry 7686e25c3b 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:59:42 +01:00
Matteo Collina 69cca8726f 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:59:42 +01:00
Matteo Collina b25b4960e0 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:59:42 +01:00
Matteo Collina 46fd313a45 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:59:41 +01:00
Matteo Collina ed11b570d5 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:59:41 +01:00
Matteo Collina 6c5b08e1fc 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:59:41 +01:00
Matteo Collina 22ba5857c6 tls,http: prevent nested parser execution from empty writes
An empty write on a TLS socket calls `ClearOut()` directly, even when
it comes from JS that runs inside `Cycle()`, for example the HTTP
parser's `on_body`. `ClearOut()` then decrypts the next record and
passes it to the same listener while it is still processing the
current one. For an HTTPS server this runs `llhttp_execute()` inside
itself. The nested call can stop in the middle of a body chunk and
leave the open span pointing into its own buffer, which is freed when
it returns. The outer call then reports that span against its own
buffer, so the request body contains server heap memory, or the
process aborts.

Skip the read on an empty write while a cycle is running. The cycle
reads the next record once the listener has returned.

In the HTTP parser, re-entrant `Execute()` calls remain supported, but
each call now restores the caller's buffer when it returns, and data
callbacks fail with `HPE_REENTRANT_EXECUTE` when they point outside the
buffer that is being executed.

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:59:41 +01:00
Matteo Collina 0eebafb726 http2: release headers when a stream is removed
When a peer sends more header fields than `maxHeaderListPairs`, the
stream is reset and the fields it had already accepted stay in
`current_headers_`. Each of them holds nghttp2 buffers. `RemoveStream()`
adjusted the session memory accounting but kept the headers.

A destroyed stream that still has a write on the socket is not detached
and can be collected after its session. The session destructor only
detaches the streams it still knows about, so the nghttp2 memory held
by the removed stream is still allocated and
`CHECK_EQ(current_nghttp2_memory_, 0)` aborts the process. A client can
trigger this with a single connection.

Clear the headers in `RemoveStream()`, while the session is still
alive, and in the session destructor for the streams that are still
registered, since `Detach()` does not free a stream that is referenced
elsewhere.

Refs: https://hackerone.com/reports/4150893
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1026
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123863
2026-11-11 17:59:41 +01:00
Matteo Collina d5a5280451 zlib: handle params callback after destroy
When params() queues its flush behind another write, destroying the
stream invokes the flush callback after the native handle is closed.
Propagate the write error instead of accessing the closed handle.

Assisted-by: Codex
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1037
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123862
2026-11-11 17:59:41 +01:00
Matteo Collina be2898b11f http2: avoid overflowing ALTSVC buffers
Http2Session::AltSvc allocated origin and field-value buffers at their
exact lengths but requested V8 to append a null terminator. This wrote
one byte past heap-backed buffers.

nghttp2_submit_altsvc() consumes explicit lengths and makes its own
terminated copies. Write only the string contents.

Assisted-by: OpenAI Codex
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1035
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123828
2026-11-11 17:59:41 +01:00
Antoine du Hamel 988d73f171 deps: update llhttp to 9.4.4
PR-URL: https://github.com/nodejs-private/node-private/pull/1038
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-11-11 17:59:41 +01:00
Node.js GitHub Bot cb3be3e9b5 deps: update nghttp2 to 1.71.0
PR-URL: https://github.com/nodejs/node/pull/67331
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-11 17:59:41 +01:00
nashit hayat 70d664a745 inspector: fix out-of-bounds read in ws frame decoding
Signed-off-by: nashit hayyat <nashit@bugqore.com>
PR-URL: https://github.com/nodejs/node/pull/64618
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2026-11-11 17:59:40 +01:00
Node.js GitHub Bot 2539d1cb3f deps: update ngtcp2 to 1.26.0
PR-URL: https://github.com/nodejs/node/pull/67257
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-11 17:59:33 +01:00
Filip Skokan 6c7ff35f61 test: fix X.509 generation with OpenSSL 4.1 FIPS
Use a passphrase that meets the FIPS provider's minimum for PBKDF2.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67409
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2026-11-11 17:20:36 +01:00
Filip Skokan 524341e94f tools: restore FIPS testing with default OpenSSL
OpenSSL 4.1 falls back to SHA-256 for the md5 command when MD5 is
unavailable. Select MD5 explicitly through dgst to avoid a false
failure in the negative install check.

Use the default shared OpenSSL version for FIPS again instead of
pinning it to 3.5.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67248
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-11-11 17:20:36 +01:00
Manjeet Singh 26a8d53b92 sea: mount the SEA VFS in workers at layer 0
A single executable application built with "useVfs" mounted the VFS
serving its "assets" in the main thread only, at a mount point numbered
in mount order, so a worker started from a script among the assets
could not load it. On Windows this failed as an invalid package.json
at \.\nul\package.json, because paths under the NUL device open it.

"useVfs" is the --vfs-load of a single executable application: its
"assets" or its "vfsArchive" archive are the source, and its "main" is
the entry point. Mount it at layer 0, the mount point reserved for the
--vfs-load source, whichever provider serves it, and mount it in
workers too, as was already done for an archive. Other mounts are
numbered from 1, as everywhere else.

To keep layer 0 free, reject --vfs-load in every single executable
application rather than only in one built with "vfsArchive": its entry
point is fixed, and resolving modules against its files is what
"useVfs" already does. --build-sea refuses it in "execArgv", and the
executable at startup when it comes from --node-options or from the
execArgv of a worker.

A worker started from a path into a VFS that is not mounted in it, such
as one mounted with vfs.mount() in its parent, now fails with
ERR_VFS_NOT_MOUNTED.

Fixes: https://github.com/nodejs/node/issues/67223
Assisted-by: a coding agent
Signed-off-by: Manjeet Singh <024manjeetsingh@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67239
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Philipp Dunkel <pip@pipobscure.com>
2026-11-11 17:20:36 +01:00