Back to Blog
high SEVERITY4 min read

How Denial of Service via Deeply Nested Field Names Happens in Node.js Multer and How to Fix It

A high-severity Denial of Service vulnerability (CVE-2026-5079) was discovered in the multer package, a popular Node.js middleware for handling multipart form data. Attackers could craft malicious requests with deeply nested field names to exhaust server resources. The fix upgrades multer from version 2.0.2 to 2.2.0, which implements proper limits on field name parsing depth.

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

Answer Summary

CVE-2026-5079 is a Denial of Service vulnerability in Node.js multer (versions before 2.2.0) caused by improper handling of deeply nested field names in multipart form data. The vulnerability allows attackers to send crafted requests that trigger excessive resource consumption. The fix is to upgrade multer to version 2.2.0 or later, which implements parsing depth limits to prevent the attack.

Vulnerability at a Glance

cweCWE-400 (Uncontrolled Resource Consumption)
fixUpgrade multer to version 2.2.0 which implements depth limits
riskServer unavailability, resource exhaustion, application crash
languageJavaScript/Node.js
root causeNo limit on nested field name depth in multipart form parsing
vulnerabilityDenial of Service (DoS) via Resource Exhaustion

Introduction

In the backend of this application, a high-severity Denial of Service vulnerability was lurking in backend/package-lock.json. The culprit? An outdated version of multer (version 2.0.2), the widely-used Node.js middleware for handling multipart/form-data uploads. This vulnerability, tracked as CVE-2026-5079, could have allowed attackers to crash the server by sending specially crafted requests with deeply nested field names—without even needing to authenticate.

The backend/package.json specified multer as a direct dependency:

"multer": "^2.0.2",

This version lacked critical safeguards against maliciously structured form data, creating a significant attack surface for any endpoint accepting file uploads or form submissions.

The Vulnerability Explained

What Makes Nested Field Names Dangerous?

Multer parses multipart form data, including field names like user[profile][settings][theme]. In vulnerable versions, there was no limit on how deeply these field names could be nested. An attacker could send a request with field names containing hundreds or thousands of nested brackets:

field[a][b][c][d][e][f][g][h][i][j][k][l][m][n][o][p][q][r][s][t]...

When multer attempts to parse this deeply nested structure, it recursively builds JavaScript objects. With extreme nesting depths, this process:

  1. Consumes excessive CPU cycles processing the recursive structure
  2. Exhausts memory creating deeply nested object hierarchies
  3. Blocks the event loop, preventing the server from handling other requests

Attack Scenario Specific to This Application

Consider this backend application accepting file uploads. An attacker could:

  1. Identify any endpoint using multer (file upload forms, profile picture uploads, document submissions)
  2. Craft a malicious multipart request:
POST /api/upload HTTP/1.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary

------WebKitFormBoundary
Content-Disposition: form-data; name="data[a][b][c][d][e]...[repeated 1000 times]..."

malicious
------WebKitFormBoundary--
  1. Send multiple concurrent requests to amplify the impact
  2. The server becomes unresponsive, denying service to legitimate users

The attack requires no authentication and minimal bandwidth—a small payload can cause disproportionate resource consumption.

Real-World Impact

For this application, the consequences could include:

  • Complete service outage affecting all users
  • Cascading failures if other services depend on this backend
  • Infrastructure costs from auto-scaling triggered by the attack
  • Reputation damage from service unavailability

The Fix

The fix is straightforward but critical: upgrade multer from version 2.0.2 to 2.2.0.

Before (Vulnerable)

// backend/package.json
"multer": "^2.0.2",

After (Fixed)

// backend/package.json
"multer": "^2.2.0",

The corresponding backend/package-lock.json was also updated to lock the new version and its dependency tree.

What Changed in Multer 2.2.0?

The patched version implements:

  1. Depth limits on nested field name parsing
  2. Early termination when parsing encounters excessive nesting
  3. Configurable thresholds allowing developers to set appropriate limits for their use case

These changes ensure that even maliciously crafted requests are handled safely without exhausting server resources.

Why Both Files Changed

  • backend/package.json: Updates the version constraint to require 2.2.0+
  • backend/package-lock.json: Locks the exact resolved version and updates the dependency tree, ensuring consistent installations across environments

Key Takeaways

  • Multer versions before 2.2.0 are vulnerable to DoS via nested field names—upgrade immediately if you're using an older version
  • Small payloads can cause massive resource consumption when parsing logic lacks depth limits
  • The backend/package-lock.json file is a security-critical artifact—include it in vulnerability scans
  • Defense in depth matters: even with patched dependencies, configure explicit limits on multer options
  • Automated dependency scanning catches vulnerabilities that manual code review might miss

How Orbis AppSec Detected This

  • Source: Multipart form data field names from incoming HTTP requests
  • Sink: Multer's field name parsing logic in the vulnerable version 2.0.2
  • Missing control: No depth limit on nested field name parsing, allowing unbounded recursion
  • CWE: CWE-400 (Uncontrolled Resource Consumption)
  • Fix: Upgraded multer from 2.0.2 to 2.2.0, which implements parsing depth limits

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-2026-5079 demonstrates how a seemingly innocent feature—nested field names in form data—can become a severe security vulnerability when proper limits aren't enforced. The fix was simple: a version bump from multer 2.0.2 to 2.2.0. But the lesson is broader: dependency management is security management.

Keep your dependencies updated, configure explicit limits even when using patched versions, and leverage automated security scanning to catch vulnerabilities before attackers do. A few minutes of proactive maintenance can prevent hours of incident response.

Prevention and further reading

View the Security Fix

Check out the pull request that fixed this vulnerability

View PR #1725

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.