CVE-2025-56571

7.5 HIGH

📋 TL;DR

Finance.js v4.1.0 contains a Denial of Service vulnerability in its IRR function where improper handling of the depth parameter can cause excessive CPU consumption. This allows attackers to crash or stall applications using this library by providing malicious input. Any application using Finance.js v4.1.0 for financial calculations is affected.

💻 Affected Systems

Products:
  • Finance.js
Versions: v4.1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using the IRR function with user-controlled depth parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete application unavailability due to CPU exhaustion, potentially affecting all users and disrupting financial operations.

🟠

Likely Case

Application performance degradation or temporary unavailability for users accessing the vulnerable IRR function.

🟢

If Mitigated

Minimal impact with proper input validation and resource limits in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Simple HTTP request with malicious parameter can trigger the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v4.1.1 or later

Vendor Advisory: https://github.com/ebradyjobory/finance.js

Restart Required: Yes

Instructions:

1. Update Finance.js to v4.1.1 or later using npm update finance.js. 2. Restart your application. 3. Verify the update was successful.

🔧 Temporary Workarounds

Input Validation

all

Implement server-side validation to limit depth parameter values

// Validate depth parameter before passing to IRR function
if (depth > 1000) { throw new Error('Depth too high'); }

Resource Limiting

linux

Implement CPU usage limits for the application process

// Use process resource limits in Node.js
process.setrlimit(process.RLIMIT_CPU, { soft: 5, hard: 10 });

🧯 If You Can't Patch

  • Implement WAF rules to block requests with suspicious depth parameter values
  • Monitor CPU usage and implement automatic restart thresholds for the application

🔍 How to Verify

Check if Vulnerable:

Check package.json for finance.js version 4.1.0

Check Version:

npm list finance.js

Verify Fix Applied:

Verify finance.js version is 4.1.1 or later in package.json

📡 Detection & Monitoring

Log Indicators:

  • High CPU usage spikes
  • Application crash logs
  • Requests with unusually high depth parameter values

Network Indicators:

  • HTTP requests to IRR endpoints with large depth parameters
  • Increased response times for financial calculation endpoints

SIEM Query:

source="application.logs" AND ("IRR" OR "depth") AND (cpu_usage>90 OR status="500")

🔗 References

📤 Share & Export