Back to Blog
high SEVERITY5 min read

How Denial of Service via Unbounded Data Size Happens in Node.js HTTP Clients and How to Fix It

A high-severity denial of service vulnerability (CVE-2025-58754) was discovered in axios versions prior to 1.12.0, where the library failed to enforce data size limits on HTTP responses. This flaw could allow attackers to crash Node.js applications by sending massive payloads that exhaust memory. The fix involved upgrading axios from version 1.11.0 to 1.12.0 in the ComfyUIGen plugin's dependencies.

O
By Orbis AppSec
Published August 9, 2026Reviewed August 9, 2026

Answer Summary

CVE-2025-58754 is a high-severity Denial of Service (DoS) vulnerability in axios, a popular Node.js HTTP client library, caused by missing data size validation on incoming responses (CWE-400: Uncontrolled Resource Consumption). Attackers can exploit this by sending extremely large HTTP responses that exhaust application memory. The fix is straightforward: upgrade axios to version 1.12.0 or later, which implements proper response size limits.

Vulnerability at a Glance

cweCWE-400
fixUpgrade axios dependency from 1.11.0 to 1.12.0
riskApplication crash and service unavailability through memory exhaustion
languageJavaScript/Node.js
root causeaxios versions before 1.12.0 did not validate or limit incoming HTTP response sizes
vulnerabilityDenial of Service (DoS) via Unbounded Data Size

Introduction

The ComfyUIGen plugin, designed for AI image generation via ComfyUI, relied on axios version 1.11.0 for making HTTP requests. During a routine security scan, Trivy flagged a critical issue: the axios dependency in Plugin/ComfyUIGen/package-lock.json was vulnerable to CVE-2025-58754, a denial of service attack that could bring down the entire application.

This vulnerability is particularly dangerous for plugins that interact with external services—exactly what ComfyUIGen does when communicating with ComfyUI backends. An attacker controlling or intercepting these HTTP responses could craft a malicious payload designed to exhaust the Node.js process's memory, causing the plugin and potentially the entire application to crash.

The Vulnerability Explained

What Went Wrong

Axios is one of the most popular HTTP client libraries in the JavaScript ecosystem, used by millions of projects for making HTTP requests. In versions prior to 1.12.0, axios had a fundamental flaw: it didn't properly enforce limits on the size of data it would accept from HTTP responses.

Looking at the vulnerable dependency declaration in package.json:

"dependencies": {
    "axios": "^1.6.0",
    "uuid": "^9.0.0"
}

This semver range (^1.6.0) allowed npm to resolve to version 1.11.0, which is what the package-lock.json recorded:

"node_modules/axios": {
    "version": "1.11.0",
    "resolved": "https://registry.npmmirror.com/axios/-/axios-1.11.0.tgz",
    "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==",
    ...
}

How the Attack Works

Consider how ComfyUIGen likely uses axios to communicate with a ComfyUI backend:

const axios = require('axios');

// Fetching generated image data from ComfyUI
const response = await axios.get('http://comfyui-server/api/images/output.png');
const imageData = response.data;

In a normal scenario, this returns image data of a few megabytes. But what if an attacker can control or intercept the response? They could return an HTTP response claiming to be a valid image but actually streaming gigabytes of data:

HTTP/1.1 200 OK
Content-Type: image/png
Transfer-Encoding: chunked

[Endless stream of data...]

With vulnerable axios versions, the library would happily buffer this entire response into memory. A 4GB response on a server with 2GB of RAM? The Node.js process crashes with an out-of-memory error. The service becomes unavailable. If this is a production system handling multiple users, all of them lose access.

Real-World Attack Scenario

For ComfyUIGen specifically, the attack surface includes:

  1. Compromised ComfyUI Server: If an attacker gains control of the ComfyUI backend, they can return malicious responses to all axios requests
  2. Man-in-the-Middle: On networks without TLS or with certificate validation disabled, attackers can intercept and modify responses
  3. DNS Hijacking: Redirecting the ComfyUI hostname to an attacker-controlled server

Any of these scenarios allows the attacker to send unbounded data that crashes the plugin.

The Fix

The fix is elegantly simple: upgrade axios to version 1.12.0, which properly enforces data size limits.

Before (Vulnerable)

package.json:

"dependencies": {
    "axios": "^1.6.0",
    "uuid": "^9.0.0"
}

package-lock.json:

"node_modules/axios": {
    "version": "1.11.0",
    "resolved": "https://registry.npmmirror.com/axios/-/axios-1.11.0.tgz",
    ...
}

After (Fixed)

package.json:

"dependencies": {
    "axios": "^1.12.0",
    "uuid": "^9.0.0"
}

package-lock.json:

"node_modules/axios": {
    "version": "1.12.0",
    "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.0.tgz",
    "integrity": "sha512-oXTDccv8PcfjZmPGlWsPSwtOJCZ/b6W5jAMCNcfwJbCzDckwG0jrYJFaWH1yvivfCXjVzV/SPDEhMB3Q+DSurg==",
    ...
}

Why Both Files Changed

  1. package.json: The version constraint was updated from ^1.6.0 to ^1.12.0 to ensure that future npm install commands will always resolve to at least version 1.12.0

  2. package-lock.json: This file records the exact resolved version. Updating it ensures that all developers and CI/CD pipelines get the exact same patched version (1.12.0) rather than potentially resolving to a vulnerable version

What axios 1.12.0 Does Differently

The patched version implements proper enforcement of the maxContentLength and maxBodyLength configuration options. Even if developers don't explicitly set these limits, axios 1.12.0 applies sensible defaults that prevent unbounded memory consumption.

Key Takeaways

  • Axios versions before 1.12.0 are vulnerable to CVE-2025-58754: Any project using axios 1.11.0 or earlier should upgrade immediately
  • The ComfyUIGen plugin's HTTP communication with ComfyUI backends was at risk: External service communication is a prime attack vector for DoS vulnerabilities
  • Semver ranges can silently allow vulnerable versions: The ^1.6.0 constraint permitted resolution to the vulnerable 1.11.0 version
  • Both package.json and package-lock.json must be updated: Changing only one file leaves the vulnerability potentially exploitable
  • Defense in depth matters: Even with patched libraries, explicitly setting maxContentLength and timeout provides additional protection

How Orbis AppSec Detected This

  • Source: HTTP responses from external ComfyUI services consumed by the axios client in the ComfyUIGen plugin
  • Sink: axios response handling in Plugin/ComfyUIGen/ where unbounded data could be buffered into memory
  • Missing control: No enforced limit on HTTP response body size in axios versions prior to 1.12.0
  • CWE: CWE-400 (Uncontrolled Resource Consumption)
  • Fix: Upgraded axios dependency from 1.11.0 to 1.12.0 in both package.json and package-lock.json

Orbis AppSec automatically detected this vulnerability and opened a pull request with the fix. Try Orbis AppSec on your repositories to find and fix issues like this automatically.

Conclusion

CVE-2025-58754 serves as a reminder that even well-maintained, popular libraries can have serious security flaws. The axios library is used by countless Node.js applications, and this DoS vulnerability could have widespread impact if left unpatched.

For the ComfyUIGen plugin specifically, this vulnerability could have allowed attackers to crash the image generation service by exploiting the HTTP communication channel with ComfyUI backends. The fix—a simple version bump—eliminates this attack vector while maintaining full backward compatibility.

Keep your dependencies updated, run regular security audits, and implement defense in depth. Your future self (and your users) will thank you.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #429

Related Articles

critical

deleteNestedProperty Prototype Pollution via Dot-Notation Path

The `deleteNestedProperty` function in propertyUtils.ts allowed attackers to manipulate JavaScript object prototypes by passing specially crafted dot-notation paths like `__proto__.polluted`. A fix now blocks dangerous keys before processing, preventing prototype pollution attacks that could affect all objects in the application.

high

How Denial of Service via Infinite Loop Happens in JavaScript Dependencies and How to Fix It

CVE-2026-67213 is a high-severity denial of service vulnerability in nanoid before version 5.1.6 that triggers an infinite loop during random ID generation when processing specially crafted input. We upgraded nanoid across the entire dependency tree to patch this flaw and prevent attackers from freezing application threads. This fix ensures that ID generation remains resilient even when handling adversarial input patterns.

high

How Sensitive Data Exposure happens in Zotero plugins and how to fix it

A high-severity data exposure vulnerability in `Zotero.ts` automatically transmitted complete document metadata—including private notes, attachment paths, and tags—to external LLM services without user consent. The fix replaces broad `item.toJSON()` serialization with explicit field selection, sending only essential bibliographic data.

high

How missing dependency update cooldowns happen in GitHub Dependabot configurations and how to fix it

A semgrep scan flagged `.github/dependabot.yml` for lacking a cooldown period, meaning Dependabot would immediately propose updates to brand-new package versions across npm, Bundler, and Docker ecosystems. The fix adds a `cooldown: default-days: 7` block to every `package-ecosystem` entry, forcing a one-week waiting period before newly published releases are considered — reducing exposure to malicious or unstable package drops.

high

How Path Traversal Happens in TensorFlow's Data Service and How to Fix It

TensorFlow's data service dispatcher validated dataset IDs against forward-slash traversal attacks but overlooked backslash characters on non-Windows platforms, allowing attackers to escape the root directory. A targeted fix adds explicit backslash validation across all platforms, closing a high-severity path traversal vulnerability in the snapshot management system.

critical

How Unbounded WebSocket Message Handling Causes Resource Exhaustion in Node.js and How to Fix It

The WebSocketCrossServerAdapter class in a popular Node.js WebSocket library lacked any rate limiting on inbound messages, allowing attackers to flood Redis nodes and WebSocket servers with high-volume traffic. The fix introduces a configurable `rateLimit` option that caps messages per connection per second, preventing resource exhaustion while preserving legitimate functionality.