PT-2026-50149 · Deno · Deno
CVSS v3.1
7.4
High
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
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.Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Deno