Post-quantum TLS in Node.js (X25519MLKEM768): versions, config and checks
Updated:
Short answer
Node.js uses post-quantum TLS (X25519MLKEM768) automatically when it runs on OpenSSL 3.5 or newer, with no code change. Official Node.js 24 LTS binaries include OpenSSL 3.5. Check with node -p process.versions.openssl: a version below 3.5 (common with distro-built Node on Ubuntu 22.04 and 24.04), or an ecdhCurve pinned to one curve, means classical X25519 only.
Scan your site now, free
Node.js does its own TLS through the OpenSSL library it was built with. Since OpenSSL 3.5, the default TLS key shares offer the hybrid X25519MLKEM768 and plain X25519, so a Node.js HTTPS server on OpenSSL 3.5 is post-quantum ready without code changes.
1. Check which OpenSSL your Node.js uses
node -p process.versions.openssl
Official Node.js 24 LTS binaries include OpenSSL 3.5. Node.js packages from Linux distributions are often linked against the system OpenSSL instead (3.0 on Ubuntu 22.04 and 24.04), so the same Node major version can behave differently. Anything below 3.5 cannot negotiate ML-KEM.
2. Don't pin the curve list
By default ecdhCurve is 'auto', which uses OpenSSL's defaults and therefore includes the hybrid group. Old hardening snippets often set something like ecdhCurve: 'prime256v1', which silently removes it. Either delete the option or list the hybrid group first:
const https = require('node:https');
https.createServer({
key, cert,
minVersion: 'TLSv1.2',
ecdhCurve: 'X25519MLKEM768:X25519:prime256v1',
}, app).listen(443);
3. Behind a proxy, the proxy decides
If nginx, a load balancer or a CDN terminates TLS in front of Node.js, browsers never talk TLS to Node.js directly; configure that layer instead (nginx, AWS ALB/CloudFront).
4. Outgoing requests
The same rule applies when Node.js is the client (fetch, https.request): on OpenSSL 3.5 it offers X25519MLKEM768 to servers that support it.
Verify
openssl s_client -connect example.com:443 -groups X25519MLKEM768 </dev/null 2>/dev/null | grep -i group
Or run the free scan; grade A means TLS 1.3 with a hybrid post-quantum key exchange.
Sources: Node.js "v22 to v24" migration guide; OpenSSL 3.5 release notes. Checked 2026-11-09.