Deno · Deno · CVE-2026-49440
**Name of the Vulnerable Software and Affected Versions**
Deno versions prior to 2.8.1
**Description**
The `node:crypto.checkPrime()` and `crypto.checkPrimeSync()` functions failed to perform Miller-Rabin rounds when the `options.checks` variable was left at its default value of `0`. In this state, the software only performed trial division by primes up to 17,863. Consequently, any composite number whose smallest prime factor exceeded this limit was incorrectly identified as prime. This issue also affected the lower-level `op node check prime()` and `op node check prime bytes()` paths.
This flaw can be exploited in applications that use these functions with default options to validate externally supplied bignums, such as Diffie-Hellman primes, RSA factors, or configuration primes. If a crafted composite is accepted as prime, the security guarantees of the associated cryptographic protocols may collapse.
**Recommendations**
Update to version 2.8.1.
As a temporary workaround, pass an explicit `checks` value (e.g., `64`) when calling `crypto.checkPrime()` or `crypto.checkPrimeSync()` to ensure the primality loop executes.
Avoid using `crypto.checkPrime()` to validate attacker-influenced bignums in security-critical paths until the update is applied.