Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/axios/axios).
CVSS VectorVendor: https://github.com/axios/axios
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Lifecycle Timeline
3Blast Radius
ecosystem impact- 16 npm packages depend on axios (13 direct, 3 indirect)
Ecosystem-wide dependent count for version 1.7.0.
DescriptionCVE.org
Summary
Axios versions 1.7.0 through 1.15.x did not enforce configured request and response size limits when requests were sent with the fetch adapter. Applications that selected adapter: 'fetch', or ran in environments where axios resolved to the fetch adapter, could receive or send bodies larger than maxContentLength or maxBodyLength despite those limits being explicitly configured.
This can cause resource exhaustion in server-side usage when a malicious or compromised server returns an oversized response, when an attacker can supply a large data: URL, or when an application forwards attacker-controlled request bodies through axios while relying on maxBodyLength as a boundary.
Impact
The impact is availability-only. Affected applications may process, buffer, or transmit data beyond the configured limit, potentially exhausting memory, CPU, or network resources.
This does not affect axios’s default unlimited behaviour by itself: maxContentLength and maxBodyLength default to -1. The vulnerability exists when an application has configured finite limits and expects axios to enforce them.
Server-side runtimes are the primary concern. Browser impact is generally constrained by the browser process and browser fetch behavior, and should not be described as server process exhaustion.
Affected Functionality
Affected functionality includes requests using the built-in fetch adapter with finite maxContentLength or maxBodyLength values.
Relevant configurations include:
adapter: 'fetch'adapter: ['fetch', ...]whenfetchis selected- environments where neither
xhrnorhttpis available and axios falls back tofetch - custom fetch environments configured through
env.fetch
Unaffected functionality includes:
- Node.js default
httpadapter enforcement - versions before the fetch adapter was introduced
- configurations that do not rely on finite axios size limits
Technical Details
In vulnerable versions, lib/adapters/fetch.js destructured request config without maxContentLength or maxBodyLength. The adapter dispatched fetch() and then materialized the response through text(), arrayBuffer(), blob(), or related resolvers without checking the configured response limit.
The fix in e5540dc added:
maxContentLengthandmaxBodyLengthreads inlib/adapters/fetch.js- upfront
data:URL decoded-size checks - outbound body-size checks before dispatch
Content-Lengthresponse pre-checks- streaming response enforcement
- fallback checks for environments without
ReadableStream - regression tests in
tests/unit/adapters/fetch.test.js
Proof of Concept of Attack
import http from 'node:http';
import axios from 'axios';
const server = http.createServer((req, res) => {
let received = 0;
req.on('data', chunk => {
received += chunk.length;
});
req.on('end', () => {
res.end(JSON.stringify({ received }));
});
});
await new Promise(resolve => server.listen(0, resolve));
const url = `http://127.0.0.1:${server.address().port}/`;
await axios.post(url, 'A'.repeat(2 * 1024 * 1024), {
adapter: 'fetch',
maxBodyLength: 1024
});
// Vulnerable versions succeed and the server receives 2097152 bytes.
// Fixed versions reject with ERR_BAD_REQUEST.
server.close();Workarounds
Use the Node.js http adapter for server-side requests where finite size limits are security-relevant.
Validate or cap attacker-controlled request bodies before passing them to axios.
Reject or strictly allowlist attacker-controlled URL schemes, especially data: URLs, before calling axios.
<details> <summary>Original Report</summary>
Summary
When Axios is used with adapter: 'fetch', configured body/response size limits are not enforced. This allows oversized uploads/downloads (including data: URLs) despite explicit limits, which can lead to memory/resource exhaustion in server-side usage.
Details
maxBodyLength and maxContentLength are not applied in the fetch adapter flow:
- lib/adapters/fetch.js (146-160): config destructuring does not include these controls.
- lib/adapters/fetch.js (220-234): request is dispatched with fetch() without request-size enforcement.
- lib/adapters/fetch.js (267-283): response is materialized via text(), arrayBuffer(), blob(), etc. without response-size checks.
By contrast, the HTTP adapter enforces both limits.
PoC
Environment:
- Axios main at commit f7a4ee2
- Node v24.2.0
Steps:
- Start an HTTP server that counts received bytes and echoes {received}.
- Send 2 MiB with:
- adapter: 'fetch'
- maxBodyLength: 1024
- Request a 4 KiB data: URL with:
- adapter: 'fetch'
- maxContentLength: 16
Expected secure behavior: both requests rejected. Observed:
- Upload: success, server received 2097152
- data: response: success, length 4096
Impact
Type: DoS / resource exhaustion due to limit bypass. Impacted: applications using Axios fetch adapter as a server-side security control boundary for untrusted request/response sizes. </details>
---
AnalysisAI
Denial-of-service via size-limit bypass in Axios 1.7.0 through 1.15.x affects server-side Node.js applications that select the fetch adapter and rely on maxContentLength or maxBodyLength as a security boundary. Attackers controlling response bodies, data: URLs, or forwarded request payloads can exhaust memory, CPU, or network resources because the fetch adapter never reads those limits. No public exploit identified at time of analysis beyond the advisory's own proof-of-concept code.
Technical ContextAI
Axios is a widely used HTTP client distributed as the npm package axios (pkg:npm/axios). It ships multiple transport adapters - xhr for browsers, http for Node.js, and a newer fetch adapter that uses the platform fetch() API. The root cause maps to CWE-770 (Allocation of Resources Without Limits or Throttling): in lib/adapters/fetch.js, the request config was destructured without maxContentLength or maxBodyLength, so the adapter dispatched fetch() and then materialized responses via text()/arrayBuffer()/blob() without comparing against the configured caps. The companion http adapter has always enforced these limits, so the divergence between adapters is what makes the boundary unsound when applications opt into fetch.
RemediationAI
Vendor-released patch: upgrade axios to 1.16.0 or later, which lands the fixes from PRs https://github.com/axios/axios/pull/10795 and https://github.com/axios/axios/pull/10796 adding data: URL decoded-size checks, outbound body-size checks, Content-Length pre-checks, streaming enforcement, and a non-streaming fallback. If immediate upgrade is not possible, switch server-side requests where size limits are security-relevant from the fetch adapter to the Node http adapter (adapter: 'http'), which already enforces both limits; the trade-off is losing fetch-specific behavior and any reliance on platform fetch semantics. As compensating controls, validate or hard-cap attacker-controlled request bodies before passing them to axios, and reject or strictly allowlist URL schemes - particularly data: - before issuing requests, accepting that allowlisting may break legitimate use of inline payloads. Track the advisory at https://github.com/advisories/GHSA-777c-7fjr-54vf for any follow-up backports.
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
Directory traversal vulnerability in lib/app/index.js in Geddy before 13.0.8 for Node.js allows remote attackers to read
Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio
Eval injection vulnerability in index.js in the syntax-error package before 1.1.1 for Node.js 0.10.x, as used in IBM Rat
The HTTP server in Node.js 0.10.x before 0.10.21 and 0.8.x before 0.8.26 allows remote attackers to cause a denial of se
Same technique Denial Of Service
View allVendor StatusVendor
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-36261
GHSA-777c-7fjr-54vf