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, 2026•Reviewed 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

high

Unbounded Map in createLoginRateLimiter Exhausts API Memory

The console API's `createLoginRateLimiter` and `createMutationRateLimiter` stored one `Map` entry per client key with no upper bound and no expiry sweep, so an attacker rotating source addresses or identifiers could grow those maps until the Node process hit an out-of-memory crash. The fix introduces a `maxTrackedKeys` option (default 5000), a `trackedEntryLimit` sanitizer, and an `evictOldestIfFull` helper that drops the oldest tracked key while protecting the shared global counter. The rate li

high

js-yaml 4.3.1 Denial of Service: Malformed Input Hangs YAML Parser

A denial of service vulnerability in js-yaml versions 4.3.1 and earlier allows attackers to hang the YAML parser indefinitely by providing specially crafted malformed input. The fix, released in versions 4.3.2 and 3.15.2, patches the parsing logic to prevent unbounded processing. Upgrading is recommended for all applications parsing untrusted YAML data.

high

Express `app.get('*')` Wildcard Handler Path Traversal in watch.js

A first-party Express server's wildcard route handler used `req.url.indexOf('font.woff2')` to gate access to a font file, allowing attackers to bypass the substring check with crafted paths. The fix replaces the catch-all handler with explicit route registration.

critical

Updater.parseUpdate() CWE-494: Unsigned Metadata Download

The parseUpdate function in the Updater component extracted download URLs from remote server responses without cryptographic verification, enabling supply chain attacks via compromised or spoofed update servers. The fix adds strict URL validation requiring HTTPS and a trusted hostname before accepting any update metadata.

high

brace-expansion DoS: Exponential Backtracking in Nested Brace Patterns

A critical vulnerability in brace-expansion allows attackers to cause denial of service by submitting specially crafted patterns with nested braces. The exponential-time complexity in pattern expansion creates a computationally expensive path that can freeze applications processing user-controlled input.

high

CVE-2026-67213: nanoid customAlphabet Infinite Loop Fix

nanoid, a widely-used ID generator pulled in transitively through postcss and vitepress, had an infinite-loop bug in its `customAlphabet` code path before version 5.1.6. This PR pins the entire dependency tree to nanoid 5.1.16 via a pnpm override so no transitive consumer can resolve back to the vulnerable 3.3.16 release.