Commit Graph
10073 Commits
Author SHA1 Message Date
Antoine du Hamel 737db4e81b src: coerce spawnSync args to string once
PR-URL: https://github.com/nodejs/node/pull/62633
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-07-19 17:31:03 -05:00
Stefan Stojanovic 0a704f160e module,win: fix long subpath import
Fixes: https://github.com/nodejs/node/issues/62043
PR-URL: https://github.com/nodejs/node/pull/62101
Fixes: https://github.com/nodejs/node/issues/62043
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-07-19 17:30:57 -05:00
Anna Henningsen 7ea1b92256 src: convert context_frame field in AsyncWrap to internal field
Using an internal field instead of a `v8::Global<>` removes
an unnecessary memory leak footgun.

This includes a test that demonstrates the issue, albeit
using internal APIs.

It's worth noting that if this PR is not accepted, we'd still
be missing memory tracking for the `context_frame_` field,
and we'd need to add it through our memory tracking API.

PR-URL: https://github.com/nodejs/node/pull/62103
Backport-PR-URL: https://github.com/nodejs/node/pull/62357
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-07-19 17:30:55 -05:00
Anna Henningsen fbfbc83809 src: make AsyncWrap subclass internal field counts explicit
This helps ensure that we already set the correct number of
internal fields when creating objects, even if the number of
internal fields of e.g. AsyncWrap changes over time.

PR-URL: https://github.com/nodejs/node/pull/62103
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-07-19 17:30:55 -05:00
Mert Can Altin d996238946 src: handle null backing store in ArrayBufferViewContents::Read
Fixes: https://github.com/nodejs/node/issues/62342

src: handle null backing store in ArrayBufferViewContents::Read
PR-URL: https://github.com/nodejs/node/pull/62343
Fixes: https://github.com/nodejs/node/issues/62342
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-19 17:30:54 -05:00
Tim Perry f417abd4e4 crypto: add crypto::GetSSLCtx API for addon access to OpenSSL contexts
This intended to replace usage of the unsupported _external field,
offering an official API for native addons to access OpenSSL directly
while reducing the JS API and internal field exposure.

PR-URL: https://github.com/nodejs/node/pull/62254
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-07-19 17:30:53 -05:00
Anna Henningsen eb3d1475d2 src: expose async context frame debugging helper to JS
This was invaluable for debugging the previous change,
so I'm suggesting we add it regardless of it being a
debugging-only API.

PR-URL: https://github.com/nodejs/node/pull/62103
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-07-19 17:30:49 -05:00
Gerhard Stöbich a89339faf5 http: fix use-after-free when freeParser is called during llhttp_execute
When pipelined requests arrive in one TCP segment, llhttp_execute()
parses them all in a single call. If a synchronous 'close' event
handler invokes freeParser() mid-execution, cleanParser() nulls out
parser state while llhttp_execute() is still on the stack, crashing on
 the next callback.

Add an is_being_freed_ flag that freeParser() sets via
parser.markFreed() before cleaning state. Proxy::Raw checks the flag
before every callback and returns HPE_USER to abort execution early if
set.

PR-URL: https://github.com/nodejs/node/pull/62095
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-07-19 17:30:49 -05:00
Gerhard Stöbich cd6368089a src: release context frame in AsyncWrap::EmitDestroy
Release the async context frame in AsyncWrap::EmitDestroy to allow
gc to collect it.

This is in special relevant for reused resources like HTTPParser
otherwise they might keep ALS stores alive.

PR-URL: https://github.com/nodejs/node/pull/61995
Fixes: https://github.com/nodejs/node/issues/61882
Refs: https://github.com/nodejs/node/pull/48528
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-07-19 17:30:48 -05:00
Nikita Skovoroda 831b9d91f3 src: use validate_ascii_with_errors instead of validate_ascii
It has better performance

PR-URL: https://github.com/nodejs/node/pull/61122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-07-19 17:30:47 -05:00
Tobias Nießen 9d3cecd7fc src: use bool literals in TraceEnvVarOptions
The bit fields are declared as `bool` fields, yet are assigned integer
values.

PR-URL: https://github.com/nodejs/node/pull/61425
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-07-19 17:30:41 -05:00
Anna Henningsen bf636048ab src: release memory for zstd contexts in Close()
This aligns zstd streams with other compression libraries in this
regard, and enables releasing memory early when the stream ends in
JS instead of waiting for GC to clean up the wrapper object (which
is a problem that is exacerbated in the zstd context because we
do not track memory and report memory pressure to V8 yet).

PR-URL: https://github.com/nodejs/node/pull/61717
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-07-19 17:30:41 -05:00
Joyee Cheung d18c010dfb src: add more checks and clarify docs for external references
To help catch unregistered bindings.

PR-URL: https://github.com/nodejs/node/pull/61719
Refs: https://github.com/nodejs/node/pull/61718
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-07-19 17:30:40 -05:00
Anna Henningsen c471c1229e src: elide heap allocation in structured clone implementation
Small perf improvement:

    $ node benchmark/compare.js --runs 100 \
    >   --old ./node-0da120f879 --new ./node \
    >   --filter structured-clone misc > comparison.csv && \
    >   npx node-benchmark-compare comparison.csv

    [00:02:15|% 100| 1/1 files | 200/200 runs | 3/3 configs]: Done
                                                        confidence improvement accuracy (*)   (**)  (***)
    misc/structured-clone.js n=10000 type='arraybuffer'         **      1.81 %       ±1.28% ±1.68% ±2.16%
    misc/structured-clone.js n=10000 type='object'               *      0.62 %       ±0.55% ±0.73% ±0.93%
    misc/structured-clone.js n=10000 type='string'             ***      8.30 %       ±1.46% ±1.92% ±2.47%

    Be aware that when doing many comparisons the risk of a false-positive result increases.
    In this case, there are 3 comparisons, you can thus expect the following amount of false-positive results:
      0.15 false positives, when considering a   5% risk acceptance (*, **, ***),
      0.03 false positives, when considering a   1% risk acceptance (**, ***),
      0.00 false positives, when considering a 0.1% risk acceptance (***)

PR-URL: https://github.com/nodejs/node/pull/61703
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-07-19 17:30:40 -05:00
Ali Hassan bf3ff4b226 sqlite: avoid extra copy for large text binds
When binding UTF-8 strings to prepared statements, transfer ownership of
malloc-backed Utf8Value buffers to SQLite to avoid an extra copy for
large strings. Use sqlite3_bind_blob64() when binding BLOB parameters.

PR-URL: https://github.com/nodejs/node/pull/61580
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2026-07-19 17:30:39 -05:00
notvivek12 92dec8a06e dns: fix Windows SRV ECONNREFUSED by adjusting c-ares fallback detection
Newer c-ares versions set tcp_port/udp_port to 53 instead of 0,
which caused the loopback detection to fail. This fix:

- Removes the port check from loopback detection
- Adds IPv6 loopback (::1) support
- Calls EnsureServers() before each DNS query

PR-URL: https://github.com/nodejs/node/pull/61453
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-07-19 17:30:39 -05:00
Mert Can Altin 967289993a http: implement slab allocation for HTTP header parsing
PR-URL: https://github.com/nodejs/node/pull/61375
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-07-19 17:30:38 -05:00
Mika FischerandGabriel Schulhof 90eb644a50 node-api: fix data race and use-after-free in napi_threadsafe_function
Other threads can still hold a valid handle to the tsfn after
finalization if finalization was triggered by
- release with napi_tsfn_abort, or
- environment shutdown

Handle this by:
- protecting finalization itself with the mutex
- if necessary, delay deletion after finalization to when thread_count
  drops to 0
- releasing all resources as soon as possible before deletion

Fixes: https://github.com/nodejs/node/issues/55706
PR-URL: https://github.com/nodejs/node/pull/55877
Co-Authored-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-07-19 17:30:33 -05:00
Shima Ryuhei e797fa0972 inspector: fix crash when receiving non json message
PR-URL: https://github.com/nodejs/node/pull/60388
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2026-07-19 17:30:33 -05:00
Anna Henningsen 37b4a82a97 src: use Utf8Value and TwoByteValue instead of V8 helpers
Our own helper classes have the advantage of using stack storage
a lot of the time, so they should always be preferred.

PR-URL: https://github.com/nodejs/node/pull/60244
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2026-07-17 17:07:34 -05:00
Renegade334 bfab50300a perf_hooks: fix histogram fast call signatures
PR-URL: https://github.com/nodejs/node/pull/59600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2026-07-17 17:07:32 -05:00
RafaelGSS c50762c3a1 Working on v22.23.2
PR-URL: https://github.com/nodejs/node/pull/64067
2026-06-23 13:36:17 -03:00
Node.js GitHub Bot bd96dfbf03 2026-06-23, Version 22.23.1 'Jod' (LTS)
PR-URL: https://github.com/nodejs/node/pull/64067
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
2026-06-22 13:45:01 -03:00
Antoine du Hamel e896619d9b Working on v22.23.1
PR-URL: https://github.com/nodejs-private/node-private/pull/898
2026-06-18 00:15:17 +02:00
Antoine du Hamel eb77496085 2026-06-18, Version 22.23.0 'Jod' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-48618) tls: normalize hostname for server identity checks (Matteo Collina) – High
* (CVE-2026-48933) crypto: guard WebCrypto cipher output length (Filip Skokan) – High
* (CVE-2026-48937) deps: fix integration issues with the latest nghttp2 – Medium
* (CVE-2026-48930) dns,net: reject hostnames with embedded NUL bytes (Matteo Collina) – Medium
* (CVE-2026-48619) http2: cap originSet size to prevent unbounded memory growth (Matteo Collina) – Medium
* (CVE-2026-48615) lib,test: redact proxy credentials in tunnel errors (Matteo Collina) – Medium
* (CVE-2026-48934) tls: bind reusable sessions to authenticated host (Matteo Collina) – Medium
* (CVE-2026-48928) tls: fix case-sensitive SNI context matching (Matteo Collina) – Medium
* (CVE-2026-48617) permission: handle process.chdir on writereport (RafaelGSS) – Low
* (CVE-2026-48931) http: fix response queue poisoning in http.Agent (Matteo Collina) – Low
* (CVE-2026-48935) permission: disable FileHandle utimes with permission model (RafaelGSS) – Low

PR-URL: https://github.com/nodejs-private/node-private/pull/898
2026-06-17 20:12:18 +02:00
Filip Skokan 38b4c5ed51 crypto: guard WebCrypto cipher output length
Reject WebCrypto cipher operations whose computed output length would
exceed INT_MAX before passing the length to OpenSSL.

This avoids signed overflow in the AES and ChaCha20-Poly1305 one-shot
cipher paths and turns oversized inputs into a clean operation failure.

Refs: https://hackerone.com/reports/3760016
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/879
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/878
CVE-ID: CVE-2026-48933
2026-06-17 19:52:20 +02:00
aduh95 ca825a87cc deps: update undici to 6.27.0
PR-URL: https://github.com/nodejs/node/pull/63711
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-06-17 19:52:19 +02:00
Tim Perry a1a5bb9683 deps: fix integration issues with the latest nghttp2
This is a set of src & tests fixes for nghttp2 due to changes in
v1.67.0+ which require a selection of changes to how we handle
low-level protocol errors when using the latest versions of nghttp2,
changing both some src error handling and updating some tests to match.

Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62891
Backport-PR-URL: https://github.com/nodejs/node/pull/63195
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Refs: https://hackerone.com/reports/3658225
CVE-ID: CVE-2026-48937
2026-06-17 19:51:32 +02:00
Marco Ippolito 7b1b943359 Working on v22.22.4
PR-URL: https://github.com/nodejs/node/pull/63250
2026-05-13 20:33:44 +02:00
Marco Ippolito fdfa0ff0db 2026-05-13, Version 22.22.3 'Jod' (LTS)
PR-URL: https://github.com/nodejs/node/pull/63250
2026-05-11 18:29:43 +02:00
semimikoh 45b3506eb8 doc,src,test: fix dead inspector help URL
PR-URL: https://github.com/nodejs/node/pull/62745
Fixes: https://github.com/nodejs/node/issues/62743
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-11 18:27:28 +02:00
Matteo Collina ad8f518a81 zlib: fix use-after-free when reset() is called during write
The Reset() method did not check the write_in_progress_ flag before
resetting the compression stream. This allowed reset() to free the
compression library's internal state while a worker thread was still
using it during an async write, causing a use-after-free.

Add a write_in_progress_ guard to Reset() that throws an error if a
write is in progress, matching the existing pattern used by Close()
and Write().

PR-URL: TODO
Refs: https://hackerone.com/reports/3609132
PR-URL: https://github.com/nodejs/node/pull/62325
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-11 16:10:17 +02:00
Nora Dossche 4f780905c5 crypto: fix potential null pointer dereference when BIO_meth_new() fails
This function can return null, which will make the calls to
BIO_meth_set_* trigger a null deref.
Even after fixing this, there is an issue with the
`BIOPointer::New(GetMethod())` call in `NodeBIO::New` because the
`New` method cannot handle a null pointer despite other code already
guarding for this
(e.g. the `NodeBIO::New` function already checks `bio`).
This patch solves the issues by adding more null checks.

PR-URL: https://github.com/nodejs/node/pull/61788
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-05-11 16:10:16 +02:00
Node.js GitHub Bot 73cac0571a deps: update amaro to 1.1.8
PR-URL: https://github.com/nodejs/node/pull/62151
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2026-05-11 15:48:30 +02:00
Node.js GitHub Bot ae5c162b93 deps: update amaro to 1.1.7
PR-URL: https://github.com/nodejs/node/pull/61730
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-05-11 15:48:23 +02:00
Node.js GitHub Bot b819cb9977 deps: update amaro to 1.1.6
PR-URL: https://github.com/nodejs/node/pull/61603
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-05-11 15:48:16 +02:00
Node.js GitHub Bot 1a5cec0d49 deps: update acorn to 8.16.0
PR-URL: https://github.com/nodejs/node/pull/61925
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-11 15:45:50 +02:00
Nicola Del Gobbo 977ef80ac1 url: process crash via malformed UNC hostname in pathToFileURL()
Fixes: https://github.com/nodejs/node/issues/62546
PR-URL: https://github.com/nodejs/node/pull/62574
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
2026-05-11 15:38:00 +02:00
Node.js GitHub Bot 4a09efb947 crypto: update root certificates to NSS 3.121
This is the certdata.txt[0] from NSS 3.121.

This is the version of NSS that shipped in Firefox 149.0 on 2026-03-24.

Certificates added:
- OISTE Server Root RSA G1
- e-Szigno TLS Root CA 2023

Certificates removed:
-  OISTE Server Root RSA G1

[0] https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_121_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/62485
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-11 15:06:12 +02:00
Weixie Cui cf39566277 src: fix flags argument offset in JSUdpWrap
Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61948
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-05-11 14:58:12 +02:00
semimikoh 578a9a9230 src: clamp WriteUtf8 capacity to INT_MAX in EncodeInto
In TextEncoder.encodeInto, the destination buffer's byte length is
read as a size_t but then implicitly narrowed to int when passed as
the capacity argument to v8::String::WriteUtf8. When the destination
view is larger than INT_MAX (2,147,483,647 bytes), the narrowing
conversion underflows to a negative value, V8 treats it as "no
capacity", and writes 0 bytes - returning { read: 0, written: 0 }
even though the buffer has plenty of room.

Clamp the capacity to INT_MAX before passing it to WriteUtf8. This
is sufficient because the source string in encodeInto is bounded in
practice and never requires more than INT_MAX bytes to encode; only
the destination view length can exceed INT_MAX.

This issue is already fixed on main and v24.x as a side effect of
PR #58070, which migrated to the non-deprecated WriteUtf8V2 method
whose capacity parameter is size_t. WriteUtf8V2 is not available in
v22.x's V8 version, so this minimal patch fixes only the EncodeInto
path instead of backporting the full migration.

Refs: https://github.com/nodejs/node/pull/58070
Fixes: https://github.com/nodejs/node/issues/62610
Signed-off-by: semimikoh <ejffjeosms@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62621
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-05-11 14:46:03 +02:00
Joyee Cheung 1769d74613 esm: populate separate cache for require(esm) in imported CJS
Otherwise if the ESM happens to be cached separately by the ESM loader
before it gets loaded with `require(esm)` from within an imported
CJS file (which uses a re-invented require() with a couple of quirks,
including a separate cache), it won't be able to load the esm properly
from the cache.

PR-URL: https://github.com/nodejs/node/pull/59679
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:09 +02:00
RafaelGSS dbabdf751c Working on v22.22.3
PR-URL: https://github.com/nodejs-private/node-private/pull/844
2026-03-24 17:05:48 -03:00
Antoine du Hamel 2645dc7372 2026-03-24, Version 22.22.2 'Jod' (LTS)
This is a security release.

Notable changes:

build,test,deps:
  * (CVE-2026-21717) test array index hash collision
crypto:
  * (CVE-2026-21713) use timing-safe comparison in Web Cryptography HMAC
http:
  * (CVE-2026-21710) use null prototype for headersDistinct/trailersDistinct
permission:
  * (CVE-2026-21716) include permission check on lib/fs/promises
  * (CVE-2026-21715) add permission check to realpath.native
src:
  * (CVE-2026-21714) handle NGHTTP2_ERR_FLOW_CONTROL error code
tls:
  * (CVE-2026-21637) wrap SNICallback invocation in try/catch

PR-URL: https://github.com/nodejs-private/node-private/pull/844
2026-03-23 20:13:40 +01:00
RafaelGSS db48d9c675 permission: add permission check to realpath.native
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/794
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-21715
2026-03-22 17:04:56 +01:00
RafaelGSS 2a6105a63b src: handle NGHTTP2_ERR_FLOW_CONTROL error code
Refs: https://hackerone.com/reports/3531737
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/832
CVE-ID: CVE-2026-21714
2026-03-22 17:04:56 +01:00
Filip Skokan 52a52ef619 crypto: use timing-safe comparison in Web Cryptography HMAC
Use `CRYPTO_memcmp` instead of `memcmp` in `HMAC`
Web Cryptography algorithm implementations.

Ref: https://hackerone.com/reports/3533945
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/830
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/822
CVE-ID: CVE-2026-21713
2026-03-22 17:04:56 +01:00
Matteo Collina 859c8c761b deps: update undici to v6.24.1
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/62285
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-03-18 13:22:28 +01:00
73deff77c1 lib: backport _tls_common and _tls_wrap refactors
This is the same as the original change, minus the `process.emitWarning`
calls and unit tests that expect the deprecation warnings.

Original commit message:
    lib: deprecate _tls_common and _tls_wrap

    runtime deprecate the _tls_common and _tls_wrap
    modules, users should use nust node:tls insteal
    and internally internal/tls/commond and
    internal/tls/wrap should be used instead

PR-URL: https://github.com/nodejs/node/pull/57643
Backport-PR-URL: https://github.com/nodejs/node/pull/62231
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2026-03-16 17:29:52 +01:00
Marco Ippolito bb73c10b32 Working on v22.22.2
PR-URL: https://github.com/nodejs/node/pull/61947
2026-03-05 15:08:44 +01:00