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

Published date: 2026-02-09T17:46:14Z
CVE: CVE-2026-25639
Links:

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__':

  1. JSON.parse('{"__proto__": {...}}') creates an object with __proto__ as an own enumerable property
  2. Object.keys() includes '__proto__' in the iteration
  3. mergeMap['__proto__'] performs prototype chain lookup, returning Object.prototype (truthy object)
  4. The expression mergeMap[prop] || mergeDeepProperties evaluates to Object.prototype
  5. Object.prototype(...) throws TypeError: merge is not a function

The mergeConfig function is called by:

  • Axios._request() at lib/core/Axios.js:75
  • Axios.getUri() at lib/core/Axios.js:201
  • All HTTP method shortcuts (get, post, etc.) at lib/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:

  1. Clone axios repository or npm install axios
  2. Create file poc.mjs with the code above
  3. Run: node poc.mjs
  4. 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.

Affected versions: ["0.30.2", "0.30.1", "0.30.0", "0.29.0", "0.28.1", "0.28.0", "0.27.2", "0.27.1", "0.27.0", "0.26.1", "0.26.0", "0.25.0", "0.24.0", "0.23.0", "0.22.0", "0.21.4", "0.21.3", "0.21.2", "0.21.1", "0.21.0", "0.20.0", "0.20.0-0", "0.19.2", "0.19.1", "0.19.0", "0.19.0-beta.1", "0.18.1", "0.18.0", "0.17.1", "0.17.0", "0.16.2", "0.16.1", "0.16.0", "0.15.3", "0.15.2", "0.15.1", "0.15.0", "0.14.0", "0.13.1", "0.13.0", "0.12.0", "0.11.1", "0.11.0", "0.10.0", "0.9.1", "0.9.0", "0.8.1", "0.8.0", "0.7.0", "0.6.0", "0.5.4", "0.5.3", "0.5.2", "0.5.1", "0.5.0", "0.4.2", "0.4.1", "0.4.0", "0.3.1", "0.3.0", "0.2.2", "0.2.1", "0.2.0", "0.1.0", "1.13.4", "1.13.3", "1.13.2", "1.13.1", "1.13.0", "1.12.2", "1.12.1", "1.12.0", "1.11.0", "1.10.0", "1.9.0", "1.8.4", "1.8.3", "1.8.2", "1.8.1", "1.8.0", "1.7.9", "1.7.8", "1.7.7", "1.7.6", "1.7.5", "1.7.4", "1.7.3", "1.7.2", "1.7.1", "1.7.0", "1.7.0-beta.2", "1.7.0-beta.1", "1.7.0-beta.0", "1.6.8", "1.6.7", "1.6.6", "1.6.5", "1.6.4", "1.6.3", "1.6.2", "1.6.1", "1.6.0", "1.5.1", "1.5.0", "1.4.0", "1.3.6", "1.3.5", "1.3.4", "1.3.3", "1.3.2", "1.3.1", "1.3.0", "1.2.6", "1.2.5", "1.2.4", "1.2.3", "1.2.2", "1.2.1", "1.2.0", "1.2.0-alpha.1", "1.1.3", "1.1.2", "1.1.1", "1.1.0", "1.0.0"]
Secure versions: [0.30.3, 1.0.0-alpha.1, 1.13.5, 1.13.6]
Recommendation: Update to version 1.13.6.

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