CVE-2022-25324: Denial of Service in bignum

bignum Updated 02 Oct 2025

Summary

07/05/2022
No i
High
7.5

CVE-2022-25324: Uncaught Exception in bignum. Affects bignum versions < 0.13.1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The npm package bignum is a library that provides arbitrary-precision arithmetic in JavaScript. It allows developers to perform mathematical operations on large numbers with precision. However, all versions of bignum are vulnerable to a Denial of Service (DoS) attack due to a type-check exception in V8, the JavaScript engine used by Node.js. This vulnerability can be exploited by an attacker to crash the application, leading to a service outage.

Vulnerability Detail

The vulnerability in bignum arises from a type-check exception in V8 when verifying the type of the second argument to the .powm function. This exception causes V8 to crash, bypassing any try/catch blocks in the Node.js application. As a result, an attacker can send a specially crafted request that triggers this exception, causing the application to crash and become unavailable. The impact of this vulnerability is a Denial of Service, where legitimate users are unable to access the affected service.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating the bignum package is not immediately feasible, developers can implement a workaround by adding input validation to prevent the vulnerable function from being called with malicious inputs. By checking the type of the second argument before calling the .powm function, developers can avoid triggering the type-check exception and mitigate the vulnerability. Here's an example of how the input validation can be implemented in JavaScript:

function powm(base, exponent, modulus) {
  if (typeof exponent !== 'number') {
    throw new Error('Exponent must be a number');
  }

  // Rest of the code
}

Conclusion

The bignum package is vulnerable to a Denial of Service (DoS) attack due to a type-check exception in V8. Developers should update to version 0.13.2 or later to fix the vulnerability. In the meantime, implementing input validation can serve as a temporary workaround. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for bignum →

Share this vulnerability

FAQ

The impact of this vulnerability is a Denial of Service (DoS) attack, where an attacker can crash the application, rendering it unavailable to legitimate users.

To fix this vulnerability, update the bignum package to version 0.13.2 or later. Alternatively, implement input validation to prevent the vulnerable function from being called with malicious inputs.

Yes, all versions of the bignum package are vulnerable to this Denial of Service (DoS) vulnerability.

Yes, developers can implement input validation to mitigate the vulnerability until the package is updated. See the 'workaround' section for an example.

Yes, this vulnerability can be exploited remotely by sending a specially crafted request to the affected application.

Related vulnerabilities

Recent vulnerabilities recorded for bignum.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback