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·11 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

•15 minutes ago•GHSA-X975-RGX4-5FH4
8.2

GHSA-X975-RGX4-5FH4: Unescaped Locator Data Cross-Site Scripting in appium-mcp MCP-UI Resource

GHSA-X975-RGX4-5FH4 is a high-severity Cross-Site Scripting (XSS) vulnerability residing in the Model Context Protocol (MCP) User Interface (UI) component of appium-mcp, an NPM package integrating Appium with MCP clients. The flaw exists within the createLocatorGeneratorUI utility function, which renders UI metadata directly into an HTML template page without performing sanitization or encoding. Because MCP clients use window.parent.postMessage to send commands from the UI to the host, this XSS can be escalated to trigger arbitrary MCP tool calls, potentially leading to Remote Code Execution (RCE) on the host running the MCP client.

Alon Barad
Alon Barad
1 views•6 min read
•about 1 hour ago•GHSA-H3M5-97JQ-QJRF
9.6

GHSA-H3M5-97JQ-QJRF: Insecure Direct Object Reference (IDOR) Cross-Realm Bulk Alarm Deletion in OpenRemote Manager

An Insecure Direct Object Reference (IDOR) and missing authorization flaw in OpenRemote Manager allows an authenticated, low-privilege multi-tenant user to execute cross-realm bulk alarm deletion, resulting in permanent destruction of safety-critical alarms belonging to other tenants.

Amit Schendel
Amit Schendel
2 views•7 min read
•about 1 hour ago•GHSA-WVRH-2F4M-924V
5.5

GHSA-wvrh-2f4m-924v: Symlink-Following Arbitrary File Write in ChatterBot UbuntuCorpusTrainer

An insecure file extraction vulnerability exists in the UbuntuCorpusTrainer component of the ChatterBot package. Due to a combination of a predictable download path, a check-then-create directory pattern, and unvalidated symbolic link resolution during archive extraction, local attackers can write arbitrary files to restricted filesystem paths.

Amit Schendel
Amit Schendel
1 views•6 min read
•about 2 hours ago•GHSA-CW6H-FFMH-X6VH
6.5

GHSA-CW6H-FFMH-X6VH: Arbitrary Local File Disclosure via Same-Origin Policy Bypass in Anki Desktop

Anki Desktop for Windows, macOS, and Linux is vulnerable to local file disclosure and data exfiltration due to an iframe-based Same-Origin Policy (SOP) bypass. Maliciously crafted user scripts inside imported deck files run within the localhost context, bypassing security filters to query internal endpoints and read arbitrary system files.

Alon Barad
Alon Barad
3 views•4 min read
•about 7 hours ago•GHSA-4CC2-G9W2-FHF6
5.9

GHSA-4cc2-g9w2-fhf6: Server-Side Request Forgery in python-zeep via Transitive Schema Resolution

A regression in python-zeep (versions 4.0.0 through 4.3.2) silently ignores the security configuration designed to block transitive external resource fetches during WSDL and XSD parsing. This defect exposes applications to Server-Side Request Forgery (SSRF) when loading untrusted schemas.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 8 hours ago•CVE-2026-11941
5.6

CVE-2026-11941: Use-After-Free Vulnerabilities in Cloudflare Quiche FFI Layer

Two critical use-after-free vulnerabilities exist within the Foreign Function Interface (FFI) layer of Cloudflare Quiche, affecting connection ID iterator functions. These flaws occur because raw pointers are returned to C callers pointing to temporary, owned Rust values that are immediately dropped and deallocated upon function exit. This leads to undefined behavior, potential limited heap information disclosure, or application crashes when integrating applications dereference these dangling pointers.

Alon Barad
Alon Barad
5 views•7 min read