CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-42037

CVE-2026-42037: CRLF Injection in Axios Multipart Form Data Generation

Amit Schendel
Amit Schendel
Senior Security Researcher

May 5, 2026·5 min read·19 visits

Executive Summary (TL;DR)

Axios < 1.15.1 is vulnerable to CRLF injection within multipart/form-data bodies. Attackers controlling the MIME type of uploaded files can inject malicious headers or manipulate the body payload. Upgrading to 1.15.1 resolves the issue.

A CRLF injection vulnerability exists in Axios versions 1.0.0 through 1.15.0 when operating in a Node.js environment. The flaw allows attackers to inject arbitrary headers into multipart/form-data payloads due to improper sanitization of the file type property, bypassing native Node.js HTTP header protections.

Vulnerability Overview

The vulnerability, identified as CVE-2026-42037, resides in the popular axios HTTP client library when utilized within a Node.js environment. Specifically, the flaw affects the logic responsible for generating multipart/form-data payloads, a standard format for transmitting files and complex data structures over HTTP.

The core issue is a CWE-93 (Improper Neutralization of CRLF Sequences) vulnerability. When constructing the sub-headers for individual parts of a multipart message, axios extracts metadata from the input objects. If the input contains a Blob or File-like object, the library retrieves its .type property to specify the MIME type of the payload.

Because this property is processed without sanitization, an attacker can supply a crafted .type string containing carriage return and line feed (CRLF) characters. These characters serve as structural delimiters in the HTTP protocol. Injecting them allows the attacker to alter the intended structure of the multipart payload, leading to header injection within the request body.

Root Cause Analysis

The flaw is located in the FormDataPart constructor within lib/helpers/formDataToStream.js. During the construction of a multipart/form-data request, axios iterates over the entries provided in the user-supplied FormData object. The library dynamically builds the headers for each part before appending the actual data.

The vulnerability stems from the use of raw string concatenation to build these headers. The code accesses the .type property of a Blob or File object and appends it directly to the Content-Type definition. The lack of input validation or encoding means any control characters present in the .type string are passed unmodified into the final stream.

This behavior circumvents the native CRLF injection protections introduced in Node.js version 18. The built-in Node.js mitigations target the primary HTTP request headers passed to functions like http.request(). Because the axios multipart construction occurs entirely within the request payload, the underlying Node.js http module treats the generated boundaries and sub-headers as opaque body data, performing no sanitization.

Code Analysis

Prior to the patch, the vulnerable logic in lib/helpers/formDataToStream.js constructed the part headers using direct interpolation. The code assumed the .type property would only contain standard MIME type identifiers.

// Vulnerable Implementation
let headers = 'Content-Disposition: form-data; name="' + key + '"';
if (filename) {
  headers += '; filename="' + filename + '"';
}
headers += CRLF;
// The value.type is concatenated directly with a trailing CRLF
headers += 'Content-Type: ' + (value.type || 'application/octet-stream') + CRLF;

The fix introduced in version 1.15.1 implements a sanitization function to strip newline and carriage return characters from the input. This prevents the attacker from prematurely terminating the header section.

// Patched Implementation
// A helper function strips CRLF sequences globally
const sanitize = (str) => str ? str.replace(/[\r\n]/g, '') : '';
 
let headers = 'Content-Disposition: form-data; name="' + sanitize(key) + '"';
if (filename) {
  headers += '; filename="' + sanitize(filename) + '"';
}
headers += CRLF;
// The value.type is explicitly sanitized before concatenation
headers += 'Content-Type: ' + (sanitize(value.type) || 'application/octet-stream') + CRLF;

Exploitation and Attack Methodology

Exploitation requires an architecture where a server-side Node.js application uses axios to proxy or forward user-supplied files to another endpoint. The attacker must have control over the MIME type attribute of the uploaded file.

The attacker constructs a malicious payload by appending \r\n to the expected MIME type, followed by arbitrary HTTP headers. If the attacker wishes to manipulate the body of the specific multipart section, they inject an additional \r\n to complete the header block.

A proof-of-concept payload sets the .type property to image/jpeg\r\nInjected-Header: malicious-value\r\n\r\n[Malicious Content]. When processed by the vulnerable axios version, the resulting multipart segment includes the injected header and alters the payload content boundary. The target backend parsing this multipart stream interprets the injected values as legitimate sub-headers.

Impact Assessment

The vulnerability holds a CVSS v3.1 score of 5.3 (Medium), reflecting its limited scope but high exploitability under specific conditions. The attack vector is strictly bounded by the multipart/form-data payload structure, meaning attackers cannot inject headers into the main HTTP envelope, only into the sub-headers of the specific file part.

While this limitation prevents classic HTTP request smuggling attacks against edge proxies, it enables targeted attacks against internal APIs and parsers. If the downstream service relies on the integrity of the multipart sub-headers for authentication, routing, or processing logic, the attacker can bypass these controls.

The impact on confidentiality, integrity, and availability remains context-dependent. In a typical scenario, the attacker gains low-level integrity modification capabilities over the internal request structure. Exploitation does not result in direct remote code execution or data exfiltration without chaining with a secondary vulnerability in the target backend's multipart parsing logic.

Remediation Guidance

The primary remediation strategy is upgrading the axios dependency to version 1.15.1 or later. This version implements strict CRLF stripping on both the .type and .name properties during multipart form generation.

For environments where immediate upgrading is not feasible, developers must implement strict input validation on all file uploads. This involves verifying the user-provided MIME type against an allowlist of expected formats (e.g., image/jpeg, application/pdf) before passing the object to axios.

Security teams should review server-side proxy implementations to ensure untrusted metadata is not blindly trusted. Relying on client-provided MIME types is a known anti-pattern; applications should ideally infer file types using magic bytes or server-side analysis rather than trusting the user-supplied .type property.

Official Patches

Axios ProjectGitHub Security Advisory

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS Probability
0.06%
Top 81% most exploited

Affected Systems

Node.js environments utilizing Axios for HTTP requestsServer-side applications proxying file uploads via Axios

Affected Versions Detail

Product
Affected Versions
Fixed Version
axios
Axios Project
>= 1.0.0, < 1.15.11.15.1
AttributeDetail
CWE IDCWE-93
CVSS v3.1 Score5.3 (Medium)
Attack VectorNetwork
Exploit StatusProof of Concept
EPSS Score0.00061 (18.76%)
CISA KEVNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1565.001Data Manipulation: Stored Data Manipulation
Impact
CWE-93
Improper Neutralization of CRLF Sequences ('CRLF Injection')

The software uses CRLF (carriage return line feed) sequences to signify the end of an HTTP header line, but it does not properly neutralize CRLF characters in user-supplied input.

Vulnerability Timeline

Initial patch commits identified
2026-04-07
Security fixes for fetch adapter implemented
2026-04-08
Version 1.15.0 released with partial mitigations
2026-04-09
CVE-2026-42037 and GHSA-445q-vr5w-6q77 published
2026-04-24

References & Sources

  • [1]GitHub Advisory (GHSA-445q-vr5w-6q77)
  • [2]NVD Record
  • [3]Axios Changelog

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•39 minutes ago•CVE-2026-71316
7.5

CVE-2026-71316: Information Disclosure and Authorization Bypass in Nuxt Runtime Payload Caching

CVE-2026-71316 is a high-severity vulnerability affecting the Nuxt web development framework in versions 4.4.0 up to (but excluding) 4.5.1. Due to the lack of runtime isolation in the shared server runtime storage driver, unauthenticated remote attackers can query the static-like JSON representation of a route's server-side rendered (SSR) state (_payload.json) and bypass configured page guards and application middleware to obtain highly sensitive user session records.

Amit Schendel
Amit Schendel
1 views•7 min read
•about 2 hours ago•CVE-2026-71318
4.8

CVE-2026-71318: Unauthorized Component Instantiation via Nuxt Server Island Props

CVE-2026-71318 is a vulnerability in Nuxt where unauthenticated remote attackers can trigger unauthorized component instantiation and arbitrary HTML element injection. This security flaw is caused by default attribute inheritance (fallthrough) combined with polymorphic root components inside island components accessible via the /__nuxt_island/ endpoint. Attackers can bypass standard routing checks to instantiate globally registered components or inject raw HTML tags like iframes. This vector is highly reachable since it does not require enabling the vue.runtimeCompiler option. It is patched in Nuxt versions 3.21.10 and 4.5.1.

Alon Barad
Alon Barad
2 views•9 min read
•about 3 hours ago•CVE-2026-71319
9.6

CVE-2026-71319: Remote Code Execution via Unauthenticated RPC in Nuxt DevTools

An unauthenticated remote code execution (RCE) vulnerability exists in Nuxt DevTools prior to version 3.3.1. The vulnerability arises from an unauthenticated RPC channel exposed over the Vite Hot Module Replacement (HMR) WebSocket server, allowing an attacker to modify file editor configurations and execute arbitrary commands under the server context.

Alon Barad
Alon Barad
4 views•4 min read
•about 4 hours ago•CVE-2026-71320
8.1

CVE-2026-71320: Remote Code Execution in Nuxt via Server-Side Template Injection in Server Islands

A highly critical Server-Side Remote Code Execution (RCE) vulnerability exists in the Nuxt framework when Server Islands and the Vue runtime compiler are simultaneously enabled. This allows unauthenticated remote attackers to execute arbitrary system commands on the host process by passing a crafted component definition object to the dynamic component resolution engine via public island endpoints.

Alon Barad
Alon Barad
4 views•9 min read
•about 5 hours ago•CVE-2026-71321
7.5

CVE-2026-71321: Unauthenticated Denial of Service and CPU Exhaustion in Nuxt Island Renderer

An unauthenticated remote denial of service vulnerability exists in the Nuxt framework island renderer endpoint. By transmitting large or deeply nested JSON payloads, an attacker can block the single-threaded Node.js event loop, resulting in application-wide CPU exhaustion before signature verification occurs.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 6 hours ago•CVE-2026-65601
5.3

CVE-2026-65601: Namespace Confusion Vulnerability in Traefik Gateway API HTTPRoute BackendRef ExtensionRef Resolution

CVE-2026-65601 is a critical security vulnerability within Traefik's implementation of the Kubernetes Gateway API. Due to variable reuse and incorrect namespace resolution logic in the routing engine, Traefik resolved custom extension filters (such as Traefik CRD Middlewares) inside a target backend service's namespace rather than the originating HTTPRoute's namespace. This flaw enables a low-privileged tenant to bypass namespace isolation boundaries and invoke highly privileged middleware components in foreign namespaces to which they only have service-level routing access.

Alon Barad
Alon Barad
5 views•6 min read