47690 Commits
Author SHA1 Message Date
Antoine du Hamel e63cab040c 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
v24.22.3
2026-11-10 20:06:46 +01:00
Tim Perry c3485f2417 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-10 20:03:34 +01:00
liujiahui e88009c61c deps: brotli: cherry-pick e230f474b87
Origin commit message:

	disable BROTLI_MODEL macro for some targets

	PiperOrigin-RevId: 827486322

Refs: https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e
PR-URL: https://github.com/nodejs/node/pull/61003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-11-10 16:09:39 +01:00
Matteo Collina 8e100ac90a 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-10 15:39:56 +01:00
Tim Perry 599ca08e28 tls: disable resumption for mTLS with no session id context
Signed-off-by: Tim Perry <pimterry@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/1044
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
CVE-ID: CVE-2026-123872
2026-11-07 17:30:46 +01:00
Tim Perry 981d2defc6 tls: don't allow renegotiation or HRR to change SNI
Signed-off-by: Tim Perry <pimterry@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/1044
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
CVE-ID: CVE-2026-123872
2026-11-07 17:30:46 +01:00
Tim Perry 799abe55cb tls: don't allow TLS resumption to change SNI
Signed-off-by: Tim Perry <pimterry@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/1044
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1030
CVE-ID: CVE-2026-123872
2026-11-07 17:30:46 +01:00
4f60230182 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
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/1041
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1036
CVE-ID: CVE-2026-123877
2026-11-07 17:30:45 +01:00
Matteo Collina 03f040685b 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-07 17:30:45 +01:00
RafaelGSS fdbc6ab7ac 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-07 17:30:45 +01:00
Matteo Collina 8749030ae5 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-07 17:30:45 +01:00
Matteo Collina 7be19aa614 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-07 17:30:45 +01:00
Matteo Collina 45e3b1637a 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-07 17:30:45 +01:00
Matteo Collina 25d487e3da 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-07 17:30:44 +01:00
Matteo Collina ff8938913b 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-07 17:30:44 +01:00
Matteo Collina e14e27b8d3 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-07 17:30:44 +01:00
Matteo Collina ae9ab37d62 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-07 17:30:44 +01:00
Antoine du Hamel 92e8d82e0e 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-07 17:30:44 +01:00
Filip Skokan 4c12b8a775 build: respect OpenSSL's configured API level
Shared OpenSSL 3 builds configured with --api=1.1.1 reject
OPENSSL_API_COMPAT=30000. Cap the requested compatibility level at the
configured API level for both ncrypto targets, retaining the 3.0
deprecation checks where supported.

Fixes: https://github.com/nodejs/node/issues/66950
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66953
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-11-07 17:30:43 +01:00
Filip Skokan 5654932a7d crypto: fix builds with older OpenSSL 3.0
Ubuntu 22.04's default libssl-dev still lacks EVP_PKEY_PRIVATE_KEY
even when fully updated. Provide the OpenSSL 3.0.12 definition when
the headers do not define it so --shared-openssl builds work.

Fixes: https://github.com/nodejs/node/issues/66926
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66931
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-11-07 17:30:43 +01:00
Node.js GitHub Bot 4164b5c2b4 deps: update brotli to 1.2.1
PR-URL: https://github.com/nodejs/node/pull/66990
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-11-07 17:30:43 +01:00
Matteo Collina a081fd3a3e http2: detect streams abandoned by nghttp2
When a peer sends GOAWAY(NO_ERROR), the session starts a graceful close
on its own, which disarmed the detection of nghttp2 internally
terminating the session after a protocol error. Instead, also treat it
as an internal termination when nghttp2 no longer wants to read or
write while we still have open streams.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66641
Reviewed-By: Tim Perry <pimterry@gmail.com>
CVE-ID: CVE-2026-123865
2026-11-07 17:30:43 +01:00
Node.js GitHub Bot 4fec855b1d deps: update sqlite to 3.54.1
PR-URL: https://github.com/nodejs/node/pull/66816
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-11-07 17:30:43 +01:00
Matteo Collina 22f4367981 http2: guard against null write request on cancelled stream
Cancelling an in-flight `respondWithFile()` download can leave a file
read pending on the thread pool after the HTTP/2 stream has been
destroyed. When that read completes, `StreamPipe` forwards a null
`WriteWrap` to the previous listener, which dereferences it in
`ReportWritesToJSStreamListener::OnStreamAfterReqFinished()`, crashing
the server with a NULL pointer dereference (segfault).

Guard against a null stream and null request in
`OnStreamAfterReqFinished()` so the listener returns early.

Refs: https://hackerone.com/4150894
Refs: https://github.com/nodejs/node/pull/64623
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Assisted-by: pi
PR-URL: https://github.com/nodejs/node/pull/67252
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-123875
2026-11-07 17:30:43 +01:00
Node.js GitHub Bot 17c9eb75f3 deps: update sqlite to 3.54.0
PR-URL: https://github.com/nodejs/node/pull/66663
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-11-07 17:30:42 +01:00
James M Snell d13a284de6 src: fix the fs permission tree node on wildcard nodes
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/986
Fixes: https://hackerone.com/reports/3996423
CVE-ID: CVE-2026-106071
2026-11-07 17:30:42 +01:00
Node.js GitHub Bot 57ebbdc275 deps: update undici to 7.30.2
PR-URL: https://github.com/nodejs/node/pull/67273
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-11-07 17:30:39 +01:00
Antoine du Hamel 338f67f571 Working on v24.22.3
PR-URL: https://github.com/nodejs/node/pull/67040
2026-10-28 19:31:55 +01:00
Antoine du Hamel f7f273a9bb 2026-10-28, Version 24.22.2 'Krypton' (LTS)
PR-URL: https://github.com/nodejs/node/pull/67040
v24.22.2
2026-10-27 01:07:47 +01:00
Matteo Collina 17ec999f24 stream: keep async context of parked writes
A TransformStream write that parks on backpressure was resumed from
the read that lifted the backpressure, so transform(), the writes
queued behind it, and flush() ran in the reader's async context
instead of the writer's. Capture the async context frame when the
write parks and restore it while the continuation runs, matching the
context the spec's [[backpressureChangePromise]] reaction had.

Fixes: https://github.com/nodejs/node/issues/66906

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66907
Backport-PR-URL: https://github.com/nodejs/node/pull/66915
Fixes: https://github.com/nodejs/node/issues/66906
Refs: https://github.com/nodejs/node/issues/66906
Refs: https://github.com/nodejs/node/pull/66907
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-10-27 01:04:55 +01:00
Eliau Elkouby f8bdcd54ed deps: V8: backport 786c1c2d88d4
Original commit message:

    [stack-traces] Fix overflow in Error.stackTraceLimit trimming

    When stack traces are captured for uncaught exceptions (enabled via
    Isolate::SetCaptureStackTraceForUncaughtExceptions, e.g. by the
    inspector or by Node.js's --trace-uncaught), CaptureAndSetErrorStack
    reuses the simple stack trace and trims it to Error.stackTraceLimit.

    Error.stackTraceLimit counts frames, but the raw call site data stores
    CallSiteInfo::Fields::kCount slots per frame, so the trim multiplied the
    limit by kCount: once in the uint32_t comparison against the array
    length and once, as int, to compute the new length. GetStackTraceLimit
    clamps the limit to [0, INT_MAX], so for very large limits the uint32_t
    product can wrap to a value below the array length. The trim branch is
    then taken although the limit exceeds the number of captured frames,
    and the int multiplication of the new length overflows.

    On main (kCount == 5) the product first wraps at 858993460. That limit
    trimmed the raw data to 4 slots (no complete frame) and 858993461 to 9
    slots (one frame), so error.stack silently lost frames. Infinity, the
    value from the Node.js report, is clamped to INT_MAX; its wrapped
    product (2147483643) is not below the array length, so on main it does
    not take the trim branch and does not reach the signed overflow.

    Fix this by comparing the limit with the number of frames in the raw
    data (length / kCount), and only multiplying once the limit is known to
    be smaller than the frame count. The resulting length is then bounded
    by the existing array length and cannot overflow. Behavior for limits
    that did not overflow is unchanged, since the raw data length is always
    a multiple of kCount.

    This regressed with https://crrev.com/c/7673818 (ebd15783b7b,
    "[objects]: Defer CallSiteInfo creation"), which switched from one
    CallSiteInfo per frame to kCount raw slots per frame.

    This is the underlying cause of Node.js issue 66074. The symptom there
    differs from main: Node's V8 14.6 backport of that change has
    kCount == 6 and uses int for the comparison and for RightTrim, so the
    product overflows for limits above 357913941. For many of those,
    including Infinity (INT_MAX * 6 wraps to -6), the result is negative
    and fails "Check failed: new_capacity > 0." in RightTrim. Comparing in
    frames avoids the overflow in both cases.

    The new cctest CaptureStackTraceForUncaughtExceptionHugeStackTraceLimit
    enables capture for uncaught exceptions and checks that limits of
    858993460, 858993461 and Infinity yield the same error.stack as a limit
    of 10, and that a limit of 1 still trims to a single frame. 858993460
    and 858993461 are the first limits whose product with kCount wraps
    around uint32_t; both fail without this change. The new test and the
    existing stack trace tests also pass in a UBSan build, with no
    diagnostics.

    Bug: 565047704
    Refs: https://github.com/nodejs/node/issues/66074
    Change-Id: I3422ca1de6a7dd9448c7fd53fb9bc5e40e2a17c1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8426465
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Auto-Submit: eliau elkouby (‫אליהו אלקובי‬‎) <eliau.elkouby@gmail.com>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#110043}

Refs: https://github.com/v8/v8/commit/786c1c2d88d445eecf54efe7ba9cef27a3eef3bb
Fixes: https://github.com/nodejs/node/issues/66074
Assisted-by: a closed-source coding agent
Signed-off-by: Eliau Elkouby <145869377+eliau2005@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/66249
Backport-PR-URL: https://github.com/nodejs/node/pull/66241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-27 01:00:17 +01:00
Jakob LinkeandAntoine du Hamel 3b93fd6b2b deps: V8: backport 1a0089053443
Original commit message:

    [stack traces] Fall back to full walk when receiver is unboxed

    The lightweight OptimizedJSFrame::Summarize path added in
    crrev.com/c/7722138 assumed that closure and receiver are always
    encoded as LITERAL or TAGGED_STACK_SLOT in the deopt translation.
    This holds for the closure (a JSFunction reference is always tagged)
    but not for the receiver: the "receiver" slot in an InterpretedFrame
    translation is just parameter 0 of the (possibly inlined) frame and
    is emitted via BuildDeoptFrameSingleValue, which encodes it according
    to the value's representation. An inlined frame whose `this` was
    typed as Float64 ends up as DOUBLE_STACK_SLOT, hitting UNREACHABLE in
    ResolveTaggedValue.

    Rename ResolveTaggedValue to TryResolveTaggedValue, return
    std::optional, and fall back to SummarizeFull when the receiver isn't
    a directly-resolvable tagged value.

    Fixed: 499260582
    Change-Id: I1f9cdd28e4b6b76a253a46e43b248d9239a4ecd8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7748309
    Auto-Submit: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#106423}

Refs: https://github.com/v8/v8/commit/1a0089053443ae4001fd15b84f1b46f330a0b3fa
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65764
Backport-PR-URL: https://github.com/nodejs/node/pull/66241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-27 00:59:58 +01:00
Jakob LinkeandAntoine du Hamel 5aaf62faaa deps: V8: backport c9c0abfa51f0
Original commit message:

    [stack traces] Reduce stack frame summarization costs

    During stack trace capture, Summarize() is the most expensive step — it
    creates a full TranslatedState for every optimized frame even though
    most frames are never inspected. This CL reduces that cost in two ways:

    1. Lightweight Summarize() for optimized frames: instead of building a
       full TranslatedState, walk only the deopt translation frame headers
       and resolve function/receiver via ResolveTaggedValue(), falling back
       to the full TranslatedState path for wasm-inlined or unresolvable
       closures.

    2. Deferred baseline frames: during CaptureSimpleStackTrace, baseline
       frames store the raw Code + PC offset and defer bytecode offset
       resolution to ExpandDeferredFrames(), which runs lazily before the
       stack trace is formatted or inspected.

    A new Torque bitfield flag (is_deferred_baseline_frame) marks entries in
    the raw capture array that still need resolution. All consumers
    (GetSimpleStackTrace, GetDetailedStackTraceFromCallSiteInfos,
    GetFormattedStack, PrintCurrentStackTrace) call ExpandDeferredFrames()
    before processing the array.

    Change-Id: I1fe8cce918ba129d655d66f608ac6aa0ed160920
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7722138
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Auto-Submit: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#106237}

Refs: https://github.com/v8/v8/commit/74e153d17187f07535c1812f10937f60e0ae0974
Refs: https://github.com/v8/v8/commit/c9c0abfa51f06ea3c87c4ee9bb519fa8b01fcbbf
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65764
Backport-PR-URL: https://github.com/nodejs/node/pull/66241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-27 00:59:48 +01:00
Marja HölttäandAntoine du Hamel 3b8eb1a920 deps: V8: backport ebd15783b7ba
Original commit message:

    [objects]: Defer CallSiteInfo creation

    Store the raw data in a FixedArray and create the CallSiteInfo objects
    only on demand.

    This can be further optimized to omit CallSiteInfo creation altogether
    in some code paths, but currently those code paths are not critically important.

    Change-Id: I6480862caf6b64020737527c571e3e3eac704ed3
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7673818
    Commit-Queue: Marja Hölttä <marja@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#106127}

Refs: https://github.com/v8/v8/commit/ebd15783b7ba67a135212cf7418ca2f85ebb7502
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65764
Backport-PR-URL: https://github.com/nodejs/node/pull/66241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-27 00:59:36 +01:00
Victor Gomes ab70b5d681 deps: V8: cherry-pick 853553fe755c
Original commit message:

    [trace] Don't add 'new' to Wasm call site

    When constructors builtins are inlined in Maglev, but the
    constructor itself is not, we need to mark the call site
    flag kIsConstructor. This allows the stack trace builder to add
    the 'new' string.

    However, this should not be done if the target is Wasm.
    This creates the same stack trace string as Ignition.

    Fixed: 450308355
    Change-Id: I5c21eba3b46f97ddca9c51c21a66aa8169c0293c
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7136920
    Reviewed-by: Marja Hölttä <marja@chromium.org>
    Auto-Submit: Victor Gomes <victorgomes@chromium.org>
    Commit-Queue: Victor Gomes <victorgomes@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#103617}

Refs: https://github.com/v8/v8/commit/853553fe755c6534fa8168aef1e46c67aa9e1ff7
PR-URL: https://github.com/nodejs/node/pull/66241
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-27 00:59:24 +01:00
Antoine du Hamel 59e46cac29 Working on v24.22.2
PR-URL: https://github.com/nodejs-private/node-private/pull/1012
2026-10-21 12:00:57 +02:00
Antoine du Hamel ce7aaf1cee 2026-10-21, Version 24.22.1 'Krypton' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-105481) http: ensure agent data guard works without I/O (James M Snell)
* (CVE-2026-105482) dns: validate resolve inputs for null bytes (James M Snell)
* (CVE-2026-105483) tls: fix ip normalization regression (James M Snell)
* (CVE-2026-106069) tls: reject non-canonical IP addresses (Matteo Collina)
* (CVE-2026-106073) permission: check permission model in realpathSync (RafaelGSS)
* (CVE-2026-106074) crypto: reset random caches across snapshots (Filip Skokan)
* (CVE-2026-111497) src: expose `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (Antoine du Hamel)
* (CVE-2026-111497) deps: brotli: cherry-pick 0ed4268a4401abcb44720963 (Evgenii Kliuchnikov)
* crypto: update root certificates to NSS 3.131.1 (Antoine du Hamel)
* deps: update c-ares to 1.34.9 (Node.js GitHub Bot)
* deps: update timezone to 2026e (Node.js GitHub Bot)
* deps: upgrade openssl sources to openssl-3.5.9 (Node.js GitHub Bot)
* deps: update undici to 7.30.1 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1012
v24.22.1
2026-10-20 19:54:51 +02:00
Antoine du Hamel 2a73ee5a89 crypto: update root certificates to NSS 3.131.1
This is the certdata.txt[0] from NSS 3.131.1.

Certificates removed:
- emSign ECC Root CA - G3
- emSign Root CA - C1
- emSign ECC Root CA - C3

[0] https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_131_1_RTM/lib/ckfw/builtins/certdata.txt
a749e413-a6b5-45ca-827d-a943355e84c8

PR-URL: https://github.com/nodejs/node/pull/66877
Refs: https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/vSxZxnOMMvs
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2026-10-20 19:47:37 +02:00
Ulises Gascón 01acf0ee74 tls: reject chains containing blocked public keys
Node.js embeds the Mozilla root store but has no equivalent of the
browsers' CRLSet/OneCRL and no default online revocation checking, so a
certificate chain through a compromised intermediate still verifies as
long as it reaches a trusted root. Removing the affected roots would
over-block, since other legitimate intermediates chain to them.

Add a small compiled-in blocklist of SubjectPublicKeyInfo SHA-256 hashes
and check every verified chain against it from a single
SSL_CTX_set_cert_verify_callback hook. A hit is reported as
X509_V_ERR_CERT_REVOKED through the normal verification path, so it
honours rejectUnauthorized and surfaces as authorizationError on both
client and server sockets. The hook is installed for every SSL_CTX
Node.js creates: SecureContext, QUIC and DTLS. The OpenSSL 4.1 CN name
constraint handling previously registered from crypto_tls.cc moves into
the same hook, since OpenSSL allows only one.

The initial entries are the eight eMudhra/emSign intermediates whose
private keys were reported compromised in October 2026. The same list is
shipped by Go (CVE-2026-111943) and Electron.

Sessions resumed from before this change are not re-verified, as is
standard for TLS resumption; the exposure ends with the session timeout.

Test-only hooks on the crypto binding, reachable with
--expose-internals, allow the test to block a fixture key and exercise
the full handshake.

Refs: https://github.com/electron/electron/pull/55126
Refs: https://github.com/golang/go/issues/82345
Assisted-by: Claude, Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66871
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-20 19:47:31 +02:00
Node.js GitHub Bot 1e39cd53c7 deps: update c-ares to 1.34.9
PR-URL: https://github.com/nodejs/node/pull/66868
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-20 19:46:23 +02:00
Ryan Aslett 9dc4bb57f0 tools: retry Gatekeeper check and stapling after notarization
Apple's ticket service can lag behind notarytool reporting
"Accepted", which makes the spctl assessment fail with
"source=Unnotarized Developer ID" even though the package was
notarized. Retry spctl and stapler with exponential backoff
(up to ~7.5 minutes) before failing, and fail the script if
stapling does not succeed instead of ignoring its exit status.

Refs: https://github.com/nodejs/build/issues/4527
Signed-off-by: Ryan Aslett <raslett@linuxfoundation.org>
PR-URL: https://github.com/nodejs/node/pull/66855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-20 19:46:23 +02:00
RafaelGSS 8dc18a6218 permission: check permission model in realpathSync
The equivalent entry points (fs.realpathSync.native(),
fs.promises.realpath(), fs.lstatSync(), fs.existsSync())
already deny access for the same paths

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/1011
Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/973
CVE-ID: CVE-2026-106073
2026-10-20 19:46:10 +02:00
Antoine du Hamel b5f41529df src: expose BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1002
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-111497
2026-10-20 19:45:11 +02:00
Evgenii Kliuchnikov 49dff6f57a deps: brotli: cherry-pick 0ed4268a4401abcb44720963
Original commit message:

  Detect and report invalid stream earlier.

  PiperOrigin-RevId: 876198329

PR-URL: https://github.com/nodejs-private/node-private/pull/1002
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-111497
2026-10-20 19:45:11 +02:00
Filip Skokan 4d6990b33c crypto: reset random caches across snapshots
Startup snapshots retain unused randomInt() and UUID cache entries,
causing deserialized processes to replay the same random values.

Clear the caches after user serialization callbacks and before user
deserialization callbacks. The latter also handles caches refilled by
microtasks, next ticks, or exit handlers after serialization callbacks.

Refs: https://hackerone.com/reports/4059814
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs-private/node-private/pull/987
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
CVE-ID: CVE-2026-106074
2026-10-20 19:45:10 +02:00
Matteo Collina 935918e342 tls: reject non-canonical IP addresses
TLS identity checks normalized non-canonical numeric hosts before
matching certificates. Platform resolvers can interpret the original
host as a different address.

Reject hosts that become IP addresses only after domainToASCII()
normalization.

Assisted-by: Pi
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/982
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-106069
2026-10-19 23:59:08 +02:00
James M Snell de49c913f2 tls: fix ip normalization regression
The regression is a low-severity bug that's not easy to
exploit. Basically it just means the hostname check can
be bypassed.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/985
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
CVE-ID: CVE-2026-105483
2026-10-19 23:59:07 +02:00
James M Snell 843a1627dc dns: validate resolve inputs for null bytes
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs-private/node-private/pull/984
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-105482
2026-10-19 23:59:07 +02:00
James M Snell 96c3ccb1fc http: ensure agent data guard works without I/O
Before a kept-alive socket is given to a request, now ask the OS
whether anything is waiting to be read on it. If there is, the
Agent destroys the socket and uses another one or opens a new
connection. The check doesn't consume any bytes.

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs-private/node-private/pull/983
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-105481
2026-10-19 23:55:58 +02:00
fca511adc5 deps: V8: backport 93cd21e8254b
Original commit message:

    skip fast transition path for escaped keys

    JSDataObjectBuilder's fast transition path previously compared undecoded
    source bytes of an escaped key against existing transitions.
    GetKeyChars() returned undecoded source bytes sliced using the decoded
    length, so escaped keys could incorrectly match persisted transitions
    and corrupt the keys of subsequent JSON.parse() calls.

    This patch fixes it by skipping the fast path when the key has escape
    characters.

    Co-Authored-By: 3zrvvv@gmail.com
    Bug: 521080746
    Change-Id: I77720cc34758180224ca8e0e5de0af48556ed013
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8412610
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#109925}

Refs: https://github.com/v8/v8/commit/93cd21e8254b65c15ff131b2dcadf19beadb559d
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/1008
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-10-19 23:55:01 +02:00