Commit Graph

43280 Commits (bf59539b980cbada964bf4c0991afe55668526e8)

Author SHA1 Message Date
RafaelGSS bf59539b98 src,loader,permission: throw on InternalWorker use
Previously this PR it was expected that InternalWorker
usage doesn't require the --allow-worker when the permission
model is enabled. This, however, exposes a vulnerability
whenever the instance gets accessed by the user. For example
through diagnostics_channel.subscribe('worker_threads')

PR-URL: https://github.com/nodejs-private/node-private/pull/629
Refs: https://hackerone.com/reports/2575105
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
CVE-ID: CVE-2025-23083
2025-01-21 15:53:55 -03:00
RafaelGSS 8306457110 path: fix path traversal in normalize() on Windows
Without this patch, on Windows, normalizing a relative path might result
in a path that Windows considers absolute. In rare cases, this might
lead to path traversal vulnerabilities in user code.

We attempt to detect those cases and return a relative path instead.

Co-Authored-By: Tobias Nießen <tobias.niessen@tuwien.ac.at>
PR-URL: https://github.com/nodejs-private/node-private/pull/555
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/665
CVE-ID: CVE-2025-23084
2025-01-21 15:53:46 -03:00
RafaelGSS 1b693fa03a src: fix HTTP2 mem leak on premature close and ERR_PROTO
This commit fixes a memory leak when the socket is
suddenly closed by the peer (without GOAWAY notification)
and when invalid header (by nghttp2) is identified and the
connection is terminated by peer.

Refs: https://hackerone.com/reports/2841362
PR-URL: https://github.com/nodejs-private/node-private/pull/650
Reviewed-By: James M Snell <jasnell@gmail.com>
CVE-ID: CVE-2025-23085
2025-01-21 15:53:42 -03:00
Dario Piotrowicz 23c2d33592
doc: clarify cjs/esm diff in `queueMicrotask()` vs `process.nextTick()`
the section comparing `queueMicrotask()` and `process.nextTick()`
doesn't address the different scheduling behavior that the two
functions have in cjs and esm modules, the section's introductory mjs
example also provides an incorrect output, the changes here address
such by explaining the difference between the two module types and
updating the example accordingly

PR-URL: https://github.com/nodejs/node/pull/56659
Fixes: https://github.com/nodejs/node/issues/45048
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-21 17:16:17 +00:00
RafaelGSS d07c60b08f
2025-01-21, Version 18.20.6 'Hydrogen' (LTS)
This is a security release.

Notable changes:

* CVE-2025-23084 - fix path traversal in normalize() on Windows (Medium)
* CVE-2025-23085 - fix HTTP2 mem leak on premature close and ERR_PROTO
* CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)
  (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/659
2025-01-21 13:48:26 -03:00
RafaelGSS 3efbb0dfb4
2025-01-21, Version 20.18.2 'Iron' (LTS)
This is a security release.

Notable changes:

* CVE-2025-23083 - throw on InternalWorker use when permission model is enabled (High)
* CVE-2025-23085 - src: fix HTTP2 mem leak on premature close and ERR_PROTO (Medium)
* CVE-2025-23084 - path: fix path traversal in normalize() on Windows (Medium)
* CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/664
2025-01-21 13:48:25 -03:00
RafaelGSS e81c809d9d
2025-01-21, Version 22.13.1 'Jod' (LTS)
This is a security release.

Notable changes:

* CVE-2025-23083: throw on InternalWorker use when permission model is enabled (High)
* CVE-2025-23084: fix path traversal in normalize() on Windows (Medium)
* CVE-2025-23085: fix HTTP2 mem leak on premature close and ERR_PROTO (Medium)
* CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/655
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
2025-01-21 13:48:24 -03:00
RafaelGSS b845dc6fbe
2025-01-21, Version 23.6.1 (Current)
This is a security release.

Notable changes:

* CVE-2025-23083: throw on InternalWorker use when permission model is enabled (High)
* CVE-2025-23084: fix path traversal in normalize() on Windows (Medium)
* CVE-2025-23085: fix HTTP2 mem leak on premature close and ERR_PROTO (Medium)
* CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/654
2025-01-21 13:22:23 -03:00
Shreyans Pathak 7bc2946293
doc: `WeakSet` and `WeakMap` comparison details
PR-URL: https://github.com/nodejs/node/pull/56648
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-20 20:18:21 +00:00
islandryu fdad2fa66e http2: omit server name when HTTP2 host is IP address
Fixes: https://github.com/nodejs/node/issues/56189
PR-URL: https://github.com/nodejs/node/pull/56530
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-20 06:59:01 -08:00
Meghan Denny da5f7aca6a
test: test-stream-compose.js doesn't need internals
PR-URL: https://github.com/nodejs/node/pull/56619
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-19 16:56:09 +00:00
James M Snell a5ed762d82
deps: fixup some minor coverity warnings
Fixes: https://github.com/nodejs/node/issues/56611
PR-URL: https://github.com/nodejs/node/pull/56612
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-19 16:55:54 +00:00
Michaël Zasso 322056dc32
src: initialize FSReqWrapSync in path that uses it
PR-URL: https://github.com/nodejs/node/pull/56613
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-19 16:47:50 +00:00
Maksim Gorkov 009d53ec3c
child_process: fix parsing messages with splitted length field
Fixes: https://github.com/nodejs/node/issues/55834
PR-URL: https://github.com/nodejs/node/pull/56106
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-18 19:39:56 +00:00
Colin Ihrig 840f952268
punycode: limit deprecation warning
DEP0040 is an extremely annoying warning. Most of the people
seeing it cannot do anything about it. This commit updates the
warning logic to only emit outside of node_modules. This is
similar to other warnings such as the Buffer() constructor
warning.

Ideally, this should be backported to Node 22.

Refs: https://github.com/nodejs/node/pull/47202
PR-URL: https://github.com/nodejs/node/pull/56632
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-01-18 18:01:54 +00:00
Rafael Gonzaga 6f946c95b9
doc: mention prepare --security
PR-URL: https://github.com/nodejs/node/pull/56617
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-17 21:50:56 +00:00
Node.js GitHub Bot a500382d18
deps: update libuv to 1.50.0
PR-URL: https://github.com/nodejs/node/pull/56616
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-01-17 18:54:52 +00:00
Michael Dawson 2e45656eb2
crypto: add missing return value check
Add return value check for call to SSL_CTX_add_client_CA
to be consistent with other places it is called

Fixed unused warning in one of the static analysis tools we use
at Red Hat even though it is not being reported by coverity in
the configuration we run.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/56615
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-17 17:58:47 +00:00
Antoine du Hamel 90840ccc77
tools: fix permissions in `lint-release-proposal` workflow
PR-URL: https://github.com/nodejs/node/pull/56614
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-17 16:43:26 +00:00
Joyee Cheung 74717cb7fa src: use cppgc to manage ContextifyContext
This simplifies the memory management of ContextifyContext,
making all references visible to V8.

The destructors don't need to do anything because when the wrapper is
going away, the context is already going away or otherwise it would've
been holding the wrapper alive, so there's no need to reset the
pointers in the context. Also, any global handles to the context
would've been empty at this point, and the per-Environment context
tracking code is capable of dealing with empty handles from contexts
purged elsewhere.

To this end, the context tracking code also purges empty handles
from the list now, to prevent keeping too many empty handles around.

PR-URL: https://github.com/nodejs/node/pull/56522
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-17 13:50:28 +00:00
Joyee Cheung 5d93002a14 test: add maxCount and gcOptions to gcUntil()
PR-URL: https://github.com/nodejs/node/pull/56522
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-17 13:50:27 +00:00
Marco Ippolito cee63dcf35
module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX
PR-URL: https://github.com/nodejs/node/pull/56610
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-17 12:42:50 +00:00
Pietro Marchini 22f1518d2f
test_runner: remove unused errors
PR-URL: https://github.com/nodejs/node/pull/56607
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2025-01-17 10:34:55 +00:00
Michael Dawson 00d49649da
doc: tweak info on reposts in ambassador program
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/56589
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-01-16 22:44:06 +00:00
Marco Ippolito b3641fe85d
doc: add type stripping to ambassadors program
PR-URL: https://github.com/nodejs/node/pull/56598
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-16 17:26:55 +00:00
Rafael Gonzaga 3fe8027cbb
test: add line break at end of file
PR-URL: https://github.com/nodejs/node/pull/56588
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-01-16 15:54:48 +01:00
Rafael Gonzaga c6960ee194
src: handle duplicate paths granted
This commit fixes a crash whenever someone tries to allow access to the
same path twice.

PR-URL: https://github.com/nodejs/node/pull/56591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-01-16 15:53:39 +01:00
Colin Ihrig 0e7ec5e7a1
test_runner: add TestContext.prototype.waitFor()
This commit adds a waitFor() method to the TestContext class in
the test runner. As the name implies, this method allows tests to
more easily wait for things to happen.

PR-URL: https://github.com/nodejs/node/pull/56595
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-01-16 02:32:37 +00:00
Jordan Harband e96072ad57
util: inspect: do not crash on an Error with a regex `name`
See #56570

PR-URL: https://github.com/nodejs/node/pull/56574
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-01-15 19:27:22 +00:00
Joyee Cheung 58ac6551ff
doc: improve internal documentation on built-in snapshot
Part of the tools/snapshot/README.md is out of date since we
have made more progress on the snapshot integration, so
update it accordingly with some details about the various
snapshots in the snapshot blob.

Also update the section in src/README.md about external
reference registration for clarification.

PR-URL: https://github.com/nodejs/node/pull/56505
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-01-15 16:39:02 +00:00
Chengzhong Wu 1238f0afba
util: rename CallSite.column to columnNumber
Align the property names `lineNumber` and `columnNumber`.

PR-URL: https://github.com/nodejs/node/pull/56584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-01-15 13:28:53 +00:00
Joyee Cheung 97caa4cbb7
test: mark test-worker-prof as flaky on smartos
PR-URL: https://github.com/nodejs/node/pull/56583
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-01-15 12:48:42 +00:00
pacexy c8df98d2f9
module: fix jsdoc for `format` parameter in cjs/loader
PR-URL: https://github.com/nodejs/node/pull/56501
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2025-01-15 11:25:46 +01:00
Marco Ippolito e799ebd7ff module: rethrow amaro error message
PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-01-15 10:03:04 +00:00
Node.js GitHub Bot d1a3f30642 deps: update amaro to 0.3.0
PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-01-15 10:03:04 +00:00
Marco Ippolito e52440bc3b test: update ts eval snapshots
PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-01-15 10:03:03 +00:00
Node.js GitHub Bot dd26064fcc deps: update amaro to 0.2.2
PR-URL: https://github.com/nodejs/node/pull/56568
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-01-15 10:03:03 +00:00
Rafael Gonzaga f16cd10946
meta: add codeowners of security release document
PR-URL: https://github.com/nodejs/node/pull/56521
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-01-15 03:04:53 +00:00
Jordan Harband 2570f95ad1
util: do not crash on inspecting function with `Symbol` name
Refs: https://github.com/nodejs/node/issues/56570
PR-URL: https://github.com/nodejs/node/pull/56572
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-01-15 01:16:48 +01:00
James M Snell 294abc2ffc src: update ECKeyPointer in ncrypto
PR-URL: https://github.com/nodejs/node/pull/56526
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-14 23:54:40 +00:00
James M Snell 08fa9edcaf src: update ECPointPointer in ncrypto
PR-URL: https://github.com/nodejs/node/pull/56526
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-14 23:54:40 +00:00
James M Snell d3cb7c0b96 src: update ECGroupPointer in ncrypto
PR-URL: https://github.com/nodejs/node/pull/56526
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-14 23:54:39 +00:00
James M Snell 6e23885d18 src: update ECDASSigPointer implementation in ncrypto
PR-URL: https://github.com/nodejs/node/pull/56526
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-14 23:54:39 +00:00
James M Snell 6879ab9b89 src: cleaning up more crypto internals for ncrypto
PR-URL: https://github.com/nodejs/node/pull/56526
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-01-14 23:54:38 +00:00
Carlos Espa afaa14b5ca
tools: remove github reporter
PR-URL: https://github.com/nodejs/node/pull/56468
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-01-15 00:08:39 +01:00
James M Snell 7b60bcb2f0 quic: fixup errant LocalVector usage
PR-URL: https://github.com/nodejs/node/pull/56564
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-01-14 13:28:23 -08:00
Carlos Espa 732744cc76
src,worker: add isInternalWorker
PR-URL: https://github.com/nodejs/node/pull/56469
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2025-01-14 18:24:30 +00:00
Jacob Smith fc11189cbd
doc: correct customization hook types & clarify descriptions
PR-URL: https://github.com/nodejs/node/pull/56454
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-01-14 14:24:41 +00:00
Node.js GitHub Bot 5770972dc6
deps: update undici to 7.2.1
PR-URL: https://github.com/nodejs/node/pull/56569
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-14 00:56:47 +00:00
Node.js GitHub Bot f537efd1dd
deps: update simdutf to 6.0.3
PR-URL: https://github.com/nodejs/node/pull/56567
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-01-14 00:56:11 +00:00