Node's tls and https modules use the OpenSSL bundled with Node. Official builds moved to OpenSSL 3.5 in Node 22.20.0 and 24.5.0, which brings X25519MLKEM768 in the default groups.
Requirements
- An official Node.js build of 22.20.0 / 24.5.0 or newer.
- No ecdhCurve option, or one that includes X25519MLKEM768.
Should print 3.5 or higher:
node -p process.versions.opensslTurn it on
Nothing to do with default options. If you set ecdhCurve, include the hybrid group:
server.js
import https from 'node:https';
https.createServer({
key, cert,
ecdhCurve: 'X25519MLKEM768:X25519:P-256:P-384',
}, app).listen(443);Check that it worked
Run the checker against your hostname. It reports X25519MLKEM768 as supported once the change is live.
From a terminal, with an OpenSSL 3.5+ client. Output that names X25519MLKEM768 means it works, a handshake failure alert means it does not:
openssl s_client -connect example.com:443 -servername example.com \
-tls1_3 -groups X25519MLKEM768 </dev/null 2>&1 | grep -iE 'group|alert'Common problems
- Linux distribution packages of Node are often built against the system OpenSSL (--shared-openssl), so the version check above matters more than the Node version.
- Many Node apps sit behind nginx, a load balancer or a CDN. Then the TLS that visitors see is configured there, not in Node.