Error message
error:0308010C:digital envelope routines::unsupported
Node.js 17+ (OpenSSL 3) — code ERR_OSSL_EVP_UNSUPPORTED
What it means
Some code asked OpenSSL 3 for an algorithm that its default provider no longer offers — most famously MD4, which old webpack versions use for build hashing. Node 17 switched to OpenSSL 3, and legacy digests/ciphers moved to a separate "legacy" provider that is off by default. The error names the mechanism (EVP, the digital envelope layer), not the culprit — and the same code appears anywhere OpenSSL 3 is asked for a retired algorithm, though the webpack-on-Node-17+ combination produces the overwhelming majority of hits.
Why it happens
Old build tooling requesting MD4
commonwebpack 4 up to 4.46 (and the tools that pin it — react-scripts 4, vue-cli 4, older Angular) hash modules with MD4 by default. On Node ≥17 the first build step dies with this error. The stack trace usually shows createHash inside webpack. webpack 4.47.0 added the same fallback as 5.61, so the last webpack 4 release builds again.
Application code using legacy primitives
occasionalDirect calls like createHash("md4"), createCipheriv with RC4/DES/Blowfish, or dependencies doing the same. These algorithms are cryptographically broken and were intentionally moved out of the default provider.
Ancient PKCS#12/keystore files
rareOld .p12/.pfx bundles encrypted with RC2/RC4-based schemes hit the same wall when loaded on OpenSSL 3 stacks: openssl pkcs12 without -legacy reports this code and names RC2-40-CBC. Node's own tls.createSecureContext() rejects the same file with a different message, "Unsupported PKCS12 PFX data".
How to fix it
- 1.
Upgrade the toolchain (the real fix)
webpack ≥ 5.61 (and 4.47 on the 4.x line) falls back to a WASM implementation of MD4 when OpenSSL no longer provides it; react-scripts 5 includes it. This removes the problem instead of masking it.
bash npm install --save-dev webpack@latest # CRA projects: npm install --save-dev react-scripts@5 - 2.
Stopgap: enable the legacy provider
Re-enables MD4 and friends process-wide. Acceptable to unblock a build today; do not make it permanent — it re-exposes broken algorithms to all code in the process.
bash NODE_OPTIONS=--openssl-legacy-provider npm run build - 3.
In your own code, replace the algorithm
For non-cryptographic fingerprinting, any modern digest works; nothing that verifies signatures should be on MD4/MD5 in the first place.
js // before: createHash("md4") import { createHash } from "node:crypto"; const digest = createHash("sha256").update(data).digest("hex");