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.2.6 | MIT | 4 | 2023-01-28 - 16:41 | about 3 years |
| 1.2.5 | MIT | 4 | 2023-01-26 - 15:06 | about 3 years |
| 1.2.4 | MIT | 4 | 2023-01-24 - 17:21 | about 3 years |
| 1.2.3 | MIT | 4 | 2023-01-17 - 17:56 | about 3 years |
| 1.2.2 | MIT | 4 | 2022-12-29 - 06:38 | about 3 years |
| 1.2.1 | MIT | 4 | 2022-12-05 - 19:39 | over 3 years |
| 1.2.0 | MIT | 4 | 2022-11-22 - 19:06 | over 3 years |
| 1.2.0-alpha.1 | MIT | 4 | 2022-11-10 - 19:06 | over 3 years |
| 1.1.3 | MIT | 4 | 2022-10-15 - 13:42 | over 3 years |
| 1.1.2 | MIT | 4 | 2022-10-07 - 10:14 | over 3 years |
| 1.1.1 | MIT | 4 | 2022-10-07 - 09:15 | over 3 years |
| 1.1.0 | MIT | 4 | 2022-10-06 - 19:19 | over 3 years |
| 1.0.0 | MIT | 4 | 2022-10-04 - 19:24 | over 3 years |
| 1.0.0-alpha.1 | MIT | 2022-05-31 - 19:23 | almost 4 years | |
| 0.30.3 | MIT | 2026-02-18 - 17:19 | about 1 month | |
| 0.30.2 | MIT | 1 | 2025-09-27 - 10:29 | 6 months |
| 0.30.1 | MIT | 2 | 2025-08-04 - 18:21 | 8 months |
| 0.30.0 | MIT | 2 | 2025-03-26 - 17:55 | 12 months |
| 0.29.0 | MIT | 3 | 2024-11-21 - 13:08 | over 1 year |
| 0.28.1 | MIT | 3 | 2024-03-28 - 17:36 | almost 2 years |
| 0.28.0 | MIT | 3 | 2024-02-12 - 18:38 | about 2 years |
| 0.27.2 | MIT | 3 | 2022-04-27 - 10:00 | almost 4 years |
| 0.27.1 | MIT | 3 | 2022-04-26 - 07:36 | almost 4 years |
| 0.27.0 | MIT | 3 | 2022-04-25 - 16:42 | almost 4 years |
| 0.26.1 | MIT | 3 | 2022-03-09 - 17:13 | about 4 years |
| 0.26.0 | MIT | 3 | 2022-02-13 - 14:22 | about 4 years |
| 0.25.0 | MIT | 3 | 2022-01-18 - 07:14 | about 4 years |
| 0.24.0 | MIT | 3 | 2021-10-25 - 17:51 | over 4 years |
| 0.23.0 | MIT | 3 | 2021-10-12 - 15:37 | over 4 years |
| 0.22.0 | MIT | 3 | 2021-10-01 - 05:54 | over 4 years |
| 0.21.4 | MIT | 3 | 2021-09-06 - 15:35 | over 4 years |
| 0.21.3 | MIT | 3 | 2021-09-04 - 19:05 | over 4 years |
| 0.21.2 | MIT | 3 | 2021-09-04 - 10:18 | over 4 years |
| 0.21.1 | MIT | 4 | 2020-12-22 - 04:20 | over 5 years |
| 0.21.0 | MIT | 5 | 2020-10-23 - 16:27 | over 5 years |
| 0.20.0 | MIT | 5 | 2020-08-21 - 03:12 | over 5 years |
| 0.20.0-0 | MIT | 5 | 2020-07-15 - 16:07 | over 5 years |
| 0.19.2 | MIT | 5 | 2020-01-22 - 04:25 | about 6 years |
| 0.19.1 | MIT | 5 | 2020-01-07 - 17:23 | about 6 years |
| 0.19.0 | MIT | 5 | 2019-05-30 - 16:13 | almost 7 years |
| 0.19.0-beta.1 | MIT | 5 | 2018-08-09 - 18:44 | over 7 years |
| 0.18.1 | MIT | 5 | 2019-06-01 - 00:46 | almost 7 years |
| 0.18.0 | MIT | 6 | 2018-02-19 - 23:28 | about 8 years |
| 0.17.1 | MIT | 6 | 2017-11-11 - 23:24 | over 8 years |
| 0.17.0 | MIT | 6 | 2017-10-21 - 18:01 | over 8 years |
| 0.16.2 | MIT | 6 | 2017-06-03 - 19:29 | almost 9 years |
| 0.16.1 | MIT | 6 | 2017-04-08 - 18:51 | almost 9 years |
| 0.16.0 | MIT | 6 | 2017-04-01 - 02:31 | almost 9 years |
| 0.15.3 | MIT | 6 | 2016-11-27 - 21:59 | over 9 years |
| 0.15.2 | MIT | 6 | 2016-10-18 - 01:33 | over 9 years |
