Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. deno
  4. ›
  5. CVE-2026-49440

CVE-2026-49440: Deno: Miller-Rabin Primality Test Allows Zero Rounds

June 16, 2026

node:crypto.checkPrime(candidate[, options][, callback]) and crypto.checkPrimeSync(candidate[, options]) ran no Miller-Rabin rounds at all when the caller left options.checks at its default of 0. In that mode, the only test applied to the candidate was trial division by the primes up to 17,863. Any composite whose smallest prime factor exceeds that bound — for example the product of two primes just above it, such as 17,881 × 17,891 — was reported as true (“probably prime”).

The same divergence affected the lower-level op_node_check_prime / op_node_check_prime_bytes paths that the polyfill calls into.

Node.js itself does not have this problem: it forwards checks = 0 to OpenSSL’s BN_check_prime, which substitutes a sensible default number of rounds based on the candidate’s bit length (per FIPS 186-4 Appendix C.3 Table C.1). Deno’s Rust implementation had no equivalent fallback, so count = 0 meant “skip the loop entirely.”

References

  • github.com/advisories/GHSA-9xg4-qhm4-g43w
  • github.com/denoland/deno/pull/34391
  • github.com/denoland/deno/security/advisories/GHSA-9xg4-qhm4-g43w
  • nvd.nist.gov/vuln/detail/CVE-2026-49440

Code Behaviors & Features

Detect and mitigate CVE-2026-49440 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.8.1

Fixed versions

  • 2.8.1

Solution

Upgrade to version 2.8.1 or above.

Impact 7.4 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-325: Missing Cryptographic Step

Source file

cargo/deno/CVE-2026-49440.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:50 +0000.