Skip to main content

Deno EUVDEUVD-2026-38540

| CVE-2026-49440 HIGH
Missing Cryptographic Step (CWE-325)
2026-06-16 https://github.com/denoland/deno GHSA-9xg4-qhm4-g43w
7.4
CVSS 3.1 · Vendor: https://github.com/denoland/deno
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Deno service calling checkPrime
  2. Delivery
    Craft composite from two primes above 17,863
  3. Exploit
    Submit composite as DH prime or RSA factor
  4. Install
    Trigger checkPrime default path skipping Miller-Rabin
  5. C2
    Composite accepted as prime
  6. Execute
    Downstream key exchange uses attacker-chosen modulus
  7. Impact
    Recover session keys or forge cryptographic material

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Cryptographic step completeness
Exploitation Conditions

The victim Deno application (version <= 2.8.0) must call crypto.checkPrime or crypto.checkPrimeSync either with no options argument or with options.checks set to 0 (the documented default), and must then make a security-relevant decision based on the boolean result for a bignum that the attacker can influence - typical examples per the advisory are validating a peer-supplied Diffie-Hellman prime, a prime read from attacker-reachable configuration, or an RSA factor. Exploitation is limited by these requirements: applications that pass checks >= 1, that never invoke checkPrime, that use Web Crypto (crypto.subtle) instead, or that ignore the result are not exploitable, which is the AC:H justification in the CVSS vector. No authentication or user interaction is required against a vulnerable code path (PR:N/UI:N), but the attacker must reach an input that the victim feeds into the broken API.

Impact

The provided CVSS 3.1 vector AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N (7.4 High) reflects a network-reachable but non-trivial flaw: the attacker does not need credentials, but the victim application must (a) call crypto.checkPrime with default options and (b) act on the result for security-critical input it does not control - hence AC:H. EPSS and KEV data were not supplied, and there is no public exploit identified at time of analysis, only a vendor-published reproducer in the advisory; this should be treated as a targeted cryptographic correctness bug rather than a mass-exploitation risk. The realistic impact is high for the narrow population of Deno applications that validate peer-supplied Diffie-Hellman primes, RSA factors, or configuration bignums - for them, downstream key-exchange or signature-verification guarantees collapse - but irrelevant for Deno apps that never invoke checkPrime. No conflicting signals were observed; the gap is the absence of EPSS/KEV telemetry given the recency of the CVE.

Exploit ScenarioDerived

A Deno service performs a Diffie-Hellman handshake and uses crypto.checkPrimeSync(peerPrime) with default options to sanity-check the peer-supplied modulus before key agreement. An attacker submits the composite 17,881 × 17,891 (or any product of two primes above 17,863); checkPrimeSync returns true, the handshake proceeds against a non-prime modulus whose factorization the attacker chose, and the resulting shared secret offers no real secrecy - letting the attacker recover session keys or forge messages. A working reproducer is included in the vendor advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Cryptographic primality validation in Deno's Node.js compatibility layer (versions <= 2.8.0) silently skips Miller-Rabin testing when crypto.checkPrime/checkPrimeSync is called with default options, causing crafted composites whose smallest prime factor exceeds 17,863 (e.g. 17,881 × 17,891) to be reported as prime. Remote attackers who control bignums fed into a victim Deno application can therefore smuggle composite values past validation, with no public exploit identified at time of analysis beyond the vendor-published reproducer.

RemediationAI

Vendor-released patch: Deno 2.8.1, which lands PR https://github.com/denoland/deno/pull/34391 introducing min_miller_rabin_rounds_for_bits and clamping the Miller-Rabin loop bound to at least the FIPS 186-4 Appendix C.3 minimum regardless of the caller-supplied checks value. If upgrading immediately is not possible, explicitly pass checks: 64 to every crypto.checkPrime/checkPrimeSync call (conservative for any reasonable bit length, with the trade-off of slightly higher CPU cost on large bignums), and audit code paths to ensure attacker-influenced bignums are not validated with checkPrime until you are on the patched release; treating untrusted DH primes or RSA factors as unverified is preferable to relying on the broken default. Full advisory and patch references: https://github.com/denoland/deno/security/advisories/GHSA-9xg4-qhm4-g43w and https://github.com/denoland/deno/pull/34391.

Affected VersionsENISA

deno < 2.8.1

Affected Packages

cargo deno fix: 2.8.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in cargo

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in ext/node_crypto/primes.rs inside Deno's Rust implementation of the Node.js node:crypto polyfill. Node's upstream behavior forwards checks = 0 to OpenSSL's BN_check_prime, which transparently substitutes the FIPS 186-4 Appendix C.3 Table C.1 minimum round counts based on candidate bit length; Deno's is_probably_prime instead treated the user-supplied count as authoritative, so count == 0 produced an empty for _ in 0..count loop and the only remaining filter was trial division by the SMALL_PRIMES table (largest entry 17,863). This is a textbook CWE-325 (Missing Cryptographic Step) - the probabilistic primality test required for cryptographic correctness was omitted. Web Crypto (crypto.subtle) and Deno's prime *generation* paths (generatePrime, DH parameter generation) hardcode 20 rounds and are unaffected; the package identifier from CPE data is pkg:rust/deno.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/denoland/deno) PRIMARY 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

Network-reachable bignum input, no auth or UI, but AC:H because the victim app must both call checkPrime with default options and act on the result; cryptographic guarantees collapse so C:H/I:H, no availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/denoland/deno).

CVSS VectorVendor: https://github.com/denoland/deno

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

DescriptionCVE.org

Summary

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."

Affected APIs

  • crypto.checkPrime(candidate) (callback form, default options)
  • crypto.checkPrime(candidate, { checks: 0 }, callback)
  • crypto.checkPrimeSync(candidate) (default options)
  • crypto.checkPrimeSync(candidate, { checks: 0 })

Callers who explicitly passed checks >= 1 were less affected, the loop ran the number of rounds they asked for, but were still receiving fewer rounds than Node would have applied for the same bit length. With the patched version they get at least the FIPS minimum.

Not affected

  • Deno's prime *generation* (crypto.generatePrime, crypto.generatePrimeSync, and the DH parameter generation path). Those routes go through Prime::generate_with_options in ext/node_crypto/primes.rs, which hardcodes 20 Miller-Rabin rounds and never reads a user-controlled checks value, so the bug never reached them.
  • Any other Deno-internal use of primality testing - is_probably_prime is not called from elsewhere in the runtime with count = 0.
  • Web Crypto (crypto.subtle.*), which uses entirely separate code paths and does not expose a primality test.

Impact

The realistic exposure is application-level: a Deno program that calls crypto.checkPrime (or its sync variant) with default options to validate an externally-supplied bignum, for example checking a peer-provided Diffie-Hellman prime, validating a prime read from configuration, or sanity-checking an RSA factor, will accept crafted composites as prime. The composite is trivial to construct: any product of two primes greater than 17,863 works.

Downstream consequences depend on what the program does with the "verified" prime. If the prime is fed into a key exchange, signature verification, or factorization-style check, the security guarantees of that protocol collapse to whatever the attacker engineered into the composite.

The CVSS impact is bounded by the requirement that the victim application both (a) calls checkPrime with default options and (b) acts on the result for security-relevant input it does not control.

Reproduction

ts
import { checkPrimeSync } from "node:crypto";

// 17881 and 17891 are both prime and both above the trial-division
// ceiling used by Deno's implementation.
const composite = 17881n * 17891n;

// Affected versions print `true`; the patched version prints `false`.
console.log(checkPrimeSync(composite));

The same result is reproducible from Rust against the internal helper:

rust
use num_bigint::BigInt;
let composite = BigInt::from(17881u32) * BigInt::from(17891u32);
assert!(!is_probably_prime(&composite, 0)); // fails on affected versions

Fix

PR #34391 introduces a helper min_miller_rabin_rounds_for_bits(bits) that returns the FIPS 186-4 Appendix C.3 round counts, matching the defaults OpenSSL uses inside BN_check_prime. is_probably_prime then clamps the loop bound to count.max(min_miller_rabin_rounds_for_bits(n.bits())). The probabilistic loop now always executes, regardless of what checks value the caller supplied, with a round count strong enough to keep the false-positive probability below 2^-80. Callers that pass a larger explicit checks still get exactly that many rounds.

Unit tests under ext/node_crypto/primes.rs cover the 17,881 × 17,891 case, a larger 64-bit composite, and the FIPS lookup table itself.

Workarounds

If you cannot upgrade immediately:

  • Pass an explicit checks value when calling crypto.checkPrime or crypto.checkPrimeSync. A value of 64 is conservative for any reasonable bit length and keeps the loop running.
  • Do not rely on crypto.checkPrime to validate attacker-influenced bignums in security-critical paths until you are on the patched release.

Executive ViewAI

Why It Matters

Deno's Node.js compatibility layer through version 2.8.0 contains a cryptographic validation bypass allowing composite numbers to be misidentified as prime when crypto.checkPrime or checkPrimeSync are called with default options. Organizations relying on Deno-based applications for encryption, key generation, or other cryptographic operations face potential compromise of security strength. With no public exploit identified at time of analysis, immediate patching is the critical remediation path.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 95% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

37
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +37
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy