NodeJS/axios/1.13.3
Promise based HTTP client for the browser and node.js
https://www.npmjs.com/package/axios
MIT
1 Security Vulnerabilities
Axios is Vulnerable to Denial of Service via __proto__ Key in mergeConfig
- https://github.com/axios/axios/security/advisories/GHSA-43fc-jf86-j433
- https://github.com/axios/axios/pull/7369
- https://github.com/axios/axios/commit/28c721588c7a77e7503d0a434e016f852c597b57
- https://github.com/axios/axios/releases/tag/v1.13.5
- https://nvd.nist.gov/vuln/detail/CVE-2026-25639
- https://github.com/advisories/GHSA-43fc-jf86-j433
- https://github.com/axios/axios/pull/7388
- https://github.com/axios/axios/commit/d7ff1409c68168d3057fc3891f911b2b92616f9e
- https://github.com/axios/axios/releases/tag/v0.30.3
Denial of Service via proto Key in mergeConfig
Summary
The mergeConfig function in axios crashes with a TypeError when processing configuration objects containing __proto__ as an own property. An attacker can trigger this by providing a malicious configuration object created via JSON.parse(), causing complete denial of service.
Details
The vulnerability exists in lib/core/mergeConfig.js at lines 98-101:
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
When prop is '__proto__':
JSON.parse('{"__proto__": {...}}')creates an object with__proto__as an own enumerable propertyObject.keys()includes'__proto__'in the iterationmergeMap['__proto__']performs prototype chain lookup, returningObject.prototype(truthy object)- The expression
mergeMap[prop] || mergeDeepPropertiesevaluates toObject.prototype Object.prototype(...)throwsTypeError: merge is not a function
The mergeConfig function is called by:
Axios._request()atlib/core/Axios.js:75Axios.getUri()atlib/core/Axios.js:201- All HTTP method shortcuts (
get,post, etc.) atlib/core/Axios.js:211,224
PoC
import axios from "axios";
const maliciousConfig = JSON.parse('{"__proto__": {"x": 1}}');
await axios.get("https://httpbin.org/get", maliciousConfig);
Reproduction steps:
- Clone axios repository or
npm install axios - Create file
poc.mjswith the code above - Run:
node poc.mjs - Observe the TypeError crash
Verified output (axios 1.13.4):
TypeError: merge is not a function
at computeConfigValue (lib/core/mergeConfig.js:100:25)
at Object.forEach (lib/utils.js:280:10)
at mergeConfig (lib/core/mergeConfig.js:98:9)
Control tests performed: | Test | Config | Result | |------|--------|--------| | Normal config | {"timeout": 5000} | SUCCESS | | Malicious config | JSON.parse('{"__proto__": {"x": 1}}') | CRASH | | Nested object | {"headers": {"X-Test": "value"}} | SUCCESS |
Attack scenario: An application that accepts user input, parses it with JSON.parse(), and passes it to axios configuration will crash when receiving the payload {"__proto__": {"x": 1}}.
Impact
Denial of Service - Any application using axios that processes user-controlled JSON and passes it to axios configuration methods is vulnerable. The application will crash when processing the malicious payload.
Affected environments:
- Node.js servers using axios for HTTP requests
- Any backend that passes parsed JSON to axios configuration
This is NOT prototype pollution - the application crashes before any assignment occurs.
129 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 1.13.6 | MIT | 2026-02-27 - 15:35 | 25 days | |
| 1.13.5 | MIT | 2026-02-08 - 11:05 | about 1 month | |
| 1.13.4 | MIT | 1 | 2026-01-27 - 18:18 | about 2 months |
| 1.13.3 | MIT | 1 | 2026-01-25 - 14:21 | about 2 months |
| 1.13.2 | MIT | 1 | 2025-11-04 - 20:01 | 5 months |
| 1.13.1 | MIT | 1 | 2025-10-28 - 18:55 | 5 months |
| 1.13.0 | MIT | 1 | 2025-10-27 - 16:08 | 5 months |
| 1.12.2 | MIT | 1 | 2025-09-14 - 12:59 | 6 months |
| 1.12.1 | MIT | 1 | 2025-09-12 - 14:19 | 6 months |
| 1.12.0 | MIT | 1 | 2025-09-11 - 19:33 | 6 months |
| 1.11.0 | MIT | 2 | 2025-07-23 - 06:05 | 8 months |
| 1.10.0 | MIT | 3 | 2025-06-14 - 12:11 | 9 months |
| 1.9.0 | MIT | 2 | 2025-04-24 - 20:18 | 11 months |
| 1.8.4 | MIT | 2 | 2025-03-19 - 19:27 | about 1 year |
| 1.8.3 | MIT | 2 | 2025-03-12 - 07:24 | about 1 year |
| 1.8.2 | MIT | 2 | 2025-03-07 - 07:41 | about 1 year |
| 1.8.1 | MIT | 3 | 2025-02-26 - 09:07 | about 1 year |
| 1.8.0 | MIT | 3 | 2025-02-26 - 06:01 | about 1 year |
| 1.7.9 | MIT | 3 | 2024-12-04 - 07:38 | over 1 year |
| 1.7.8 | MIT | 3 | 2024-11-25 - 21:13 | over 1 year |
| 1.7.7 | MIT | 3 | 2024-08-31 - 22:02 | over 1 year |
| 1.7.6 | MIT | 3 | 2024-08-30 - 19:56 | over 1 year |
| 1.7.5 | MIT | 3 | 2024-08-23 - 13:32 | over 1 year |
| 1.7.4 | MIT | 3 | 2024-08-13 - 19:33 | over 1 year |
| 1.7.3 | MIT | 4 | 2024-08-01 - 16:16 | over 1 year |
| 1.7.2 | MIT | 4 | 2024-05-21 - 16:58 | almost 2 years |
| 1.7.1 | MIT | 4 | 2024-05-20 - 13:32 | almost 2 years |
| 1.7.0 | MIT | 4 | 2024-05-19 - 20:25 | almost 2 years |
| 1.7.0-beta.2 | MIT | 4 | 2024-05-19 - 18:01 | almost 2 years |
| 1.7.0-beta.1 | MIT | 4 | 2024-05-07 - 18:37 | almost 2 years |
| 1.7.0-beta.0 | MIT | 4 | 2024-04-28 - 19:50 | almost 2 years |
| 1.6.8 | MIT | 4 | 2024-03-15 - 16:32 | about 2 years |
| 1.6.7 | MIT | 4 | 2024-01-25 - 19:58 | about 2 years |
| 1.6.6 | MIT | 4 | 2024-01-24 - 23:12 | about 2 years |
| 1.6.5 | MIT | 4 | 2024-01-05 - 19:52 | about 2 years |
| 1.6.4 | MIT | 4 | 2024-01-03 - 22:10 | about 2 years |
| 1.6.3 | MIT | 4 | 2023-12-26 - 23:16 | about 2 years |
| 1.6.2 | MIT | 4 | 2023-11-14 - 20:36 | over 2 years |
| 1.6.1 | MIT | 4 | 2023-11-08 - 15:09 | over 2 years |
| 1.6.0 | MIT | 4 | 2023-10-26 - 21:15 | over 2 years |
| 1.5.1 | MIT | 5 | 2023-09-26 - 18:22 | over 2 years |
| 1.5.0 | MIT | 5 | 2023-08-26 - 19:10 | over 2 years |
| 1.4.0 | MIT | 5 | 2023-04-27 - 23:05 | almost 3 years |
| 1.3.6 | MIT | 5 | 2023-04-19 - 19:38 | almost 3 years |
| 1.3.5 | MIT | 5 | 2023-04-05 - 18:03 | almost 3 years |
| 1.3.4 | MIT | 5 | 2023-02-22 - 21:06 | about 3 years |
| 1.3.3 | MIT | 5 | 2023-02-13 - 18:47 | about 3 years |
| 1.3.2 | MIT | 5 | 2023-02-03 - 18:10 | about 3 years |
| 1.3.1 | MIT | 4 | 2023-02-01 - 23:31 | about 3 years |
| 1.3.0 | MIT | 4 | 2023-01-31 - 16:55 | about 3 years |
