CVE-2023-25653
JavaScript vulnerability analysis and mitigation

Overview

A vulnerability in node-jose, a JavaScript implementation of JSON Object Signing and Encryption (JOSE) for web browsers and node.js-based servers, was discovered and assigned CVE-2023-25653. The vulnerability affects versions prior to v2.1.1 and was disclosed on February 16, 2023. The issue occurs when using the non-default 'fallback' crypto back-end, where ECC operations can trigger a Denial-of-Service (DoS) condition due to a possible infinite loop in an internal calculation (GitHub Advisory).

Technical details

The vulnerability stems from the JOSE logic implementation when neither WebCrypto nor Node crypto module is available, forcing node-jose to use its 'fallback' implementations based on node-forge. The issue occurs during the computation of X coordinates of elliptic curve points, specifically in the getX() method (pointFpGetX() in lib/deps/ecc/math.js). The root cause is that the jsbn modInverse function sometimes returns negative results, which are mathematically correct but problematic for functions expecting positive results. The Barrett reduction algorithm implementation in node-jose explicitly doesn't handle negative inputs, leading to an infinite loop. The probability of triggering this condition is estimated at roughly one in every 2^20 inputs (GitHub Advisory).

Impact

The vulnerability affects several elliptic curve algorithms including elliptic curve key generation, converting elliptic curve private keys to public keys, ECDSA signing, ECDSA verification, and ECDH key agreement. In key generation, private key conversion, and signing operations, the vulnerability can only be triggered randomly. However, in verification and key agreement operations, the vulnerability can be deliberately triggered by malicious input, potentially leading to a denial of service condition (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version v2.2.0. As a workaround, users can ensure that either WebCrypto or the Node crypto module is available in the JavaScript environment where node-jose is being run, as this issue only affects the 'fallback' crypto implementation (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management