RepoJournal
Node.js

@nodejs

The Node.js runtime - every backend team's CVE source of truth

Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: JavaScript Full archive →

The Wire · Showcase

UNDICI PATCHES HTTP/2 SESSION COLLAPSE, NODE CORE HARDENS BUFFER ENCODING

By RepoJournal · Filed · About Node.js

Undici's HTTP/2 client now auto-recovers from invalid sessions instead of failing hard, while Node core plugs a race condition that could corrupt SharedArrayBuffer-backed buffers during encoding.

The undici team shipped a critical fix that resets cached HTTP/2 session state when `session.request()` throws `ERR_HTTP2_INVALID_SESSION`, then requeues the unsent request on a fresh connection [1]. This prevents cascading failures in production where a single bad session could take down an entire client. In parallel, they're landing a connector feature that lets you prefer HTTP/2 in ALPN negotiation via a new `preferH2` option [2], solving interop headaches with load balancers that follow client preference. Over in Node core, Antoine du Hamel closed a TOCTOU race condition in SAB-backed buffer encoding that could lead to memory corruption [3], a quiet but serious fix tracked on HackerOne. The core team also cleaned up unused util functions [4] and fixed duplicated build conditions around sqlite and ffi [5]. HTTP header validation is getting more flexible too: the `insecureHTTPParser` option now gates lenient control-character handling to match the Fetch spec, letting Node interop with non-compliant servers without going fully permissive [6]. On the documentation front, undici's HTTP/2 trailers test is being refactored to use async/await patterns and shared fixtures instead of callbacks, eliminating flakiness [7].

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] fix: reset invalid HTTP/2 sessions ↗ nodejs/undici
  2. [2] feat(connect): add `preferH2` connector option to offer h2 first in ALPN ↗ nodejs/undici
  3. [3] src: remove TOCTOU race condition when encoding SAB-backed `Buffer`s nodejs/node
  4. [4] util: remove unused functions nodejs/node
  5. [5] build: remove duplicated node_use_sqlite and node_use_ffi conditions nodejs/node
  6. [6] http: align header value validation with Fetch spec ↗ nodejs/node
  7. [7] test: fix flaky http2 trailers test ↗ nodejs/undici

Quick answers

What shipped in Node.js on May 31, 2026?
Undici's HTTP/2 client now auto-recovers from invalid sessions instead of failing hard, while Node core plugs a race condition that could corrupt SharedArrayBuffer-backed buffers during encoding. In total, 14 commits and 13 pull requests landed.
Who contributed to Node.js on May 31, 2026?
3 developers shipped this update, including mcollina, Antamansid, and RajeshKumar11.
What were the notable Node.js updates?
fix: reset invalid HTTP/2 sessions, feat(connect): add `preferH2` connector option to offer h2 first in ALPN, and src: remove TOCTOU race condition when encoding SAB-backed `Buffer`s.

More from @nodejs

Daily updates, in your inbox

Follow Node.js

Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?