axios 1.15.1 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,166 +1,260 @@
1
1
  # Changelog
2
2
 
3
- ## v1.15.0 April 7, 2026
3
+ ## v1.15.2 - April 21, 2026
4
+
5
+ This release delivers prototype-pollution hardening for the Node HTTP adapter, adds an opt-in `allowedSocketPaths` allowlist to mitigate SSRF via Unix domain sockets, fixes a keep-alive socket memory leak, and ships supply-chain hardening across CI and security docs.
6
+
7
+ ## 🔒 Security Fixes
8
+
9
+ - **Prototype Pollution Hardening (HTTP Adapter):** Hardened the Node HTTP adapter and `resolveConfig`/`mergeConfig`/validator paths to read only own properties and use null-prototype config objects, preventing polluted `auth`, `baseURL`, `socketPath`, `beforeRedirect`, and `insecureHTTPParser` from influencing requests. (**#10779**)
10
+ - **SSRF via `socketPath`:** Rejects non-string `socketPath` values and adds an opt-in `allowedSocketPaths` config option to restrict permitted Unix domain socket paths, returning `AxiosError` `ERR_BAD_OPTION_VALUE` on mismatch. (**#10777**)
11
+ - **Supply-chain Hardening:** Added `.npmrc` with `ignore-scripts=true`, lockfile lint CI, non-blocking reproducible build diff, scoped CODEOWNERS, expanded `SECURITY.md`/`THREATMODEL.md` with provenance verification (`npm audit signatures`), 60-day resolution policy, and maintainer incident-response runbook. (**#10776**)
12
+
13
+ ## 🚀 New Features
14
+
15
+ - **`allowedSocketPaths` Config Option:** New request config option (and TypeScript types) to allowlist Unix domain socket paths used by the Node http adapter; backwards compatible when unset. (**#10777**)
16
+
17
+ ## 🐛 Bug Fixes
18
+
19
+ - **Keep-alive Socket Memory Leak:** Installs a single per-socket `error` listener tracking the active request via `kAxiosSocketListener`/`kAxiosCurrentReq`, eliminating per-request listener accumulation, `MaxListenersExceededWarning`, and linear heap growth under concurrent or long-running keep-alive workloads (fixes #10780). (**#10788**)
20
+
21
+ ## 🔧 Maintenance & Chores
22
+
23
+ - **Changelog:** Updated `CHANGELOG.md` with v1.15.1 release notes. (**#10781**)
24
+
25
+ [Full Changelog](https://github.com/axios/axios/compare/v1.15.1...v1.15.2)
26
+
27
+ ---
28
+
29
+ ## v1.15.1 - April 19, 2026
30
+
31
+ This release ships a coordinated set of security hardening fixes across headers, body/redirect limits, multipart handling, and XSRF/prototype-pollution vectors, alongside a broad sweep of bug fixes, test migrations, and threat-model documentation updates.
32
+
33
+ ## 🔒 Security Fixes
34
+
35
+ - **Header Injection Hardening:** Tightened validation and sanitisation across request header construction to close the header-injection attack surface. (**#10749**)
36
+
37
+ - **CRLF Stripping in Multipart Headers:** Correctly strips CR/LF from multipart header values to prevent injection via field names and filenames. (**#10758**)
38
+
39
+ - **Prototype Pollution / Auth Bypass:** Replaced unsafe `in` checks with `hasOwnProperty` to prevent authentication bypass via prototype pollution on config objects, with additional regression tests. (**#10761**, **#10760**)
40
+
41
+ - **`withXSRFToken` Truthy Bypass:** Short-circuits on any truthy non-boolean value, so an ambiguous config no longer silently leaks the XSRF token cross-origin. (**#10762**)
42
+
43
+ - **`maxBodyLength` With Zero Redirects:** Enforces `maxBodyLength` even when `maxRedirects` is set to `0`, closing a bypass path for oversized request bodies. (**#10753**)
44
+
45
+ - **Streamed Response `maxContentLength` Bypass:** Applies `maxContentLength` to streamed responses that previously bypassed the cap. (**#10754**)
46
+
47
+ - **Follow-up CVE Completion:** Completes an earlier incomplete CVE fix to fully close the regression window. (**#10755**)
48
+
49
+ ## 🚀 New Features
50
+
51
+ - **AI-Based Docs Translations:** Initial scaffold for AI-assisted translations of the documentation site. (**#10705**)
52
+
53
+ - **`Location` Request Header Type:** Adds `Location` to `CommonRequestHeadersList` for accurate typing of redirect-aware requests. (**#7528**)
54
+
55
+ ## 🐛 Bug Fixes
56
+
57
+ - **FormData Handling:** Removes `Content-Type` when no boundary is present on `FormData` fetch requests, supports multi-select fields, cancels `request.body` instead of the source stream on fetch abort, and fixes a recursion bug in form-data serialisation. (**#7314**, **#10676**, **#10702**, **#10726**)
58
+
59
+ - **HTTP Adapter:** Handles socket-only request errors without leaking keep-alive listeners. (**#10576**)
60
+
61
+ - **Progress Events:** Clamps `loaded` to `total` for computable upload/download progress events. (**#7458**)
62
+
63
+ - **Types:** Aligns `runWhen` type with the runtime behaviour in `InterceptorManager` and makes response header keys case-insensitive. (**#7529**, **#10677**)
64
+
65
+ - **`buildFullPath`:** Uses strict equality in the base/relative URL check. (**#7252**)
66
+
67
+ - **`AxiosURLSearchParams` Regex:** Improves the regex used for param serialisation to avoid edge-case mismatches. (**#10736**)
68
+
69
+ - **Resilient Value Parsing:** Parses out header/config values instead of throwing on malformed input. (**#10687**)
70
+
71
+ - **Docs Artefact Cleanup:** Removes the docs content that was incorrectly committed. (**#10727**)
72
+
73
+ ## 🔧 Maintenance & Chores
74
+
75
+ - **Threat Model & Security Docs:** Ongoing refinement of `THREATMODEL.md`, including Hopper security update, TLS and tag-replay wording, mitigation descriptions, decompression-bomb guidance, and further cleanup. (**#10672**, **#10715**, **#10718**, **#10722**, **#10763**, **#10765**)
76
+
77
+ - **Test Coverage & Migration:** Expanded `shouldBypassProxy` coverage for wildcard/IPv6/edge cases, documented and tested `AxiosError.status`, and migrated `progressEventReducer` tests to Vitest. (**#10723**, **#10725**, **#10741**)
78
+
79
+ - **Type Refactor:** Uses TypeScript utility types to deduplicate literal unions. (**#7520**)
80
+
81
+ - **Repo & CI:** Adds `CODEOWNERS`, switches v1.x releases to an ephemeral release branch, and removes orphaned Bower support. (**#10739**, **#10738**, **#10746**)
82
+
83
+ ## 🌟 New Contributors
84
+
85
+ We are thrilled to welcome our new contributors. Thank you for helping improve axios:
86
+
87
+ - **@curiouscoder-cmd** (**#7252**)
88
+ - **@tryonelove** (**#7520**)
89
+ - **@darwin808** (**#7314**)
90
+ - **@zoontek** (**#10702**)
91
+ - **@AKIB473** (**#10725**)
92
+
93
+ [Full Changelog](https://github.com/axios/axios/compare/v1.15.0...v1.15.1)
94
+
95
+ ---
96
+
97
+ ## v1.15.0 - April 7, 2026
4
98
 
5
99
  This release delivers two critical security patches targeting header injection and SSRF via proxy bypass, adds official runtime support for Deno and Bun, and includes significant CI security hardening.
6
100
 
7
101
  ## 🔒 Security Fixes
8
102
 
9
- * **Header Injection (CRLF):** Rejects any header value containing `\r` or `\n` characters to block CRLF injection chains that could be used to exfiltrate cloud metadata (IMDS). Behavior change: headers with CR/LF now throw `"Invalid character in header content"`. (__#10660__)
103
+ - **Header Injection (CRLF):** Rejects any header value containing `\r` or `\n` characters to block CRLF injection chains that could be used to exfiltrate cloud metadata (IMDS). Behavior change: headers with CR/LF now throw `"Invalid character in header content"`. (**#10660**)
10
104
 
11
- * **SSRF via `no_proxy` Bypass:** Introduces a `shouldBypassProxy` helper that normalises hostnames (strips trailing dots, handles bracketed IPv6) before evaluating `no_proxy`/`NO_PROXY` rules, closing a gap that could cause loopback or internal hosts to be inadvertently proxied. (__#10661__)
105
+ - **SSRF via `no_proxy` Bypass:** Introduces a `shouldBypassProxy` helper that normalises hostnames (strips trailing dots, handles bracketed IPv6) before evaluating `no_proxy`/`NO_PROXY` rules, closing a gap that could cause loopback or internal hosts to be inadvertently proxied. (**#10661**)
12
106
 
13
107
  ## 🚀 New Features
14
108
 
15
- * **Deno & Bun Runtime Support:** Added full smoke test suites for Deno and Bun, with CI workflows that run both runtimes before any release is cut. (__#10652__)
109
+ - **Deno & Bun Runtime Support:** Added full smoke test suites for Deno and Bun, with CI workflows that run both runtimes before any release is cut. (**#10652**)
16
110
 
17
111
  ## 🐛 Bug Fixes
18
112
 
19
- * **Node.js v22 Compatibility:** Replaced deprecated `url.parse()` calls with the WHATWG `URL`/`URLSearchParams` API across examples, sandbox, and tests, eliminating `DEP0169` deprecation warnings on Node.js v22+. (__#10625__)
113
+ - **Node.js v22 Compatibility:** Replaced deprecated `url.parse()` calls with the WHATWG `URL`/`URLSearchParams` API across examples, sandbox, and tests, eliminating `DEP0169` deprecation warnings on Node.js v22+. (**#10625**)
20
114
 
21
115
  ## 🔧 Maintenance & Chores
22
116
 
23
- * **CI Security Hardening:** Added [zizmor](https://github.com/zizmorcore/zizmor) GitHub Actions security scanner; switched npm publish to OIDC Trusted Publishing (removing the long-lived `NODE_AUTH_TOKEN`); pinned all action references to full commit SHAs; narrowed workflow permissions to least privilege; gated the publish step behind a dedicated `npm-publish` environment; and blocked the sponsor-block workflow from running on forks. (__#10618__, __#10619__, __#10627__, __#10637__, __#10641__, __#10666__)
117
+ - **CI Security Hardening:** Added [zizmor](https://github.com/zizmorcore/zizmor) GitHub Actions security scanner; switched npm publish to OIDC Trusted Publishing (removing the long-lived `NODE_AUTH_TOKEN`); pinned all action references to full commit SHAs; narrowed workflow permissions to least privilege; gated the publish step behind a dedicated `npm-publish` environment; and blocked the sponsor-block workflow from running on forks. (**#10618**, **#10619**, **#10627**, **#10637**, **#10641**, **#10666**)
24
118
 
25
- * **Docs:** Clarified HTTP/2 support and the unsupported `httpVersion` option; added documentation for header case preservation; improved the `beforeRedirect` example to prevent accidental credential leakage. (__#10644__, __#10654__, __#10624__)
119
+ - **Docs:** Clarified HTTP/2 support and the unsupported `httpVersion` option; added documentation for header case preservation; improved the `beforeRedirect` example to prevent accidental credential leakage. (**#10644**, **#10654**, **#10624**)
26
120
 
27
- * **Dependencies:** Bumped `picomatch`, `handlebars`, `serialize-javascript`, `vite` (×3), `denoland/setup-deno`, and 4 additional dev dependencies to latest versions. (__#10564__, __#10565__, __#10567__, __#10568__, __#10572__, __#10574__, __#10663__, __#10664__, __#10665__, __#10669__, __#10670__)
121
+ - **Dependencies:** Bumped `picomatch`, `handlebars`, `serialize-javascript`, `vite` (×3), `denoland/setup-deno`, and 4 additional dev dependencies to latest versions. (**#10564**, **#10565**, **#10567**, **#10568**, **#10572**, **#10574**, **#10663**, **#10664**, **#10665**, **#10669**, **#10670**)
28
122
 
29
123
  ## 🌟 New Contributors
30
124
 
31
125
  We are thrilled to welcome our new contributors. Thank you for helping improve axios:
32
126
 
33
- * **@Kilros0817** (__#10625__)
34
- * **@shaanmajid** (__#10616__, __#10617__, __#10618__, __#10619__, __#10637__, __#10641__, __#10666__)
35
- * **@ashstrc** (__#10624__, __#10644__)
36
- * **@Abhi3975** (__#10589__)
37
- * **@raashish1601** (__#10573__)
127
+ - **@Kilros0817** (**#10625**)
128
+ - **@shaanmajid** (**#10616**, **#10617**, **#10618**, **#10619**, **#10637**, **#10641**, **#10666**)
129
+ - **@ashstrc** (**#10624**, **#10644**)
130
+ - **@Abhi3975** (**#10589**)
131
+ - **@raashish1601** (**#10573**)
38
132
 
39
133
  [Full Changelog](https://github.com/axios/axios/compare/v1.14.0...v1.15.0)
40
134
 
41
135
  ---
42
136
 
43
- ## v1.14.0 March 27, 2026
137
+ ## v1.14.0 - March 27, 2026
44
138
 
45
139
  This release fixes a security vulnerability in the `formidable` dependency, resolves a CommonJS compatibility regression, hardens proxy and HTTP/2 handling, and modernises the build and test toolchain.
46
140
 
47
141
  ## 🔒 Security Fixes
48
142
 
49
- * **Formidable Vulnerability:** Upgraded `formidable` from v2 to v3 to address a reported arbitrary-file vulnerability. Updated test server and assertions to align with the v3 API. (__#7533__)
143
+ - **Formidable Vulnerability:** Upgraded `formidable` from v2 to v3 to address a reported arbitrary-file vulnerability. Updated test server and assertions to align with the v3 API. (**#7533**)
50
144
 
51
145
  ## 🐛 Bug Fixes
52
146
 
53
- * **CommonJS Compatibility:** Restored `require('axios')` in Node.js by correcting the `main` field in `package.json` to point to the built CJS bundle. (__#7532__)
147
+ - **CommonJS Compatibility:** Restored `require('axios')` in Node.js by correcting the `main` field in `package.json` to point to the built CJS bundle. (**#7532**)
54
148
 
55
- * **Fetch Adapter:** Cancel the `ReadableStream` body after the request stream capability probe to prevent resource leaks. (__#7515__)
149
+ - **Fetch Adapter:** Cancel the `ReadableStream` body after the request stream capability probe to prevent resource leaks. (**#7515**)
56
150
 
57
- * **Proxy:** Upgraded `proxy-from-env` to v2 and switched to the named `getProxyForUrl` export, fixing proxy detection from environment variables and resolving CJS bundling errors. (__#7499__)
151
+ - **Proxy:** Upgraded `proxy-from-env` to v2 and switched to the named `getProxyForUrl` export, fixing proxy detection from environment variables and resolving CJS bundling errors. (**#7499**)
58
152
 
59
- * **HTTP/2:** Close detached HTTP/2 sessions on timeout to free resources when no new requests arrive. (__#7457__)
153
+ - **HTTP/2:** Close detached HTTP/2 sessions on timeout to free resources when no new requests arrive. (**#7457**)
60
154
 
61
- * **Headers:** Trim trailing CRLF characters from normalised header values. (__#7456__)
155
+ - **Headers:** Trim trailing CRLF characters from normalised header values. (**#7456**)
62
156
 
63
157
  ## 🔧 Maintenance & Chores
64
158
 
65
- * **Toolchain Modernisation:** Migrated test suite to Vitest, updated ESLint to v10, upgraded Rollup and `@rollup/plugin-babel`, migrated to Husky 9, upgraded TypeScript to latest, and modernised the Express test harness. (__#7484__, __#7489__, __#7498__, __#7505__, __#7506__, __#7507__, __#7508__, __#7509__, __#7510__, __#7516__, __#7522__)
159
+ - **Toolchain Modernisation:** Migrated test suite to Vitest, updated ESLint to v10, upgraded Rollup and `@rollup/plugin-babel`, migrated to Husky 9, upgraded TypeScript to latest, and modernised the Express test harness. (**#7484**, **#7489**, **#7498**, **#7505**, **#7506**, **#7507**, **#7508**, **#7509**, **#7510**, **#7516**, **#7522**)
66
160
 
67
- * **Dependencies:** Bumped `multer` to v2, `minimatch`, `tar`, `pacote`, `@babel/preset-env`, and additional dev dependencies. (__#7453__, __#7480__, __#7491__, __#7504__, __#7517__, __#7531__)
161
+ - **Dependencies:** Bumped `multer` to v2, `minimatch`, `tar`, `pacote`, `@babel/preset-env`, and additional dev dependencies. (**#7453**, **#7480**, **#7491**, **#7504**, **#7517**, **#7531**)
68
162
 
69
163
  ## 🌟 New Contributors
70
164
 
71
165
  We are thrilled to welcome our new contributors. Thank you for helping improve axios:
72
166
 
73
- * **@penkzhou** (__#7515__)
74
- * **@aviu16** (__#7456__)
75
- * **@fedotov** (__#7457__)
167
+ - **@penkzhou** (**#7515**)
168
+ - **@aviu16** (**#7456**)
169
+ - **@fedotov** (**#7457**)
76
170
 
77
171
  [Full Changelog](https://github.com/axios/axios/compare/v1.13.6...v1.14.0)
78
172
 
79
173
  ---
80
174
 
81
- ## v1.13.6 February 27, 2026
175
+ ## v1.13.6 - February 27, 2026
82
176
 
83
177
  This release adds React Native Blob support, fixes several enumeration and export regressions, and patches FormData detection for WeChat Mini Program environments.
84
178
 
85
179
  ## 🚀 New Features
86
180
 
87
- * **React Native Blob Support:** Axios now correctly handles native Blob objects in React Native environments. (__#5764__)
181
+ - **React Native Blob Support:** Axios now correctly handles native Blob objects in React Native environments. (**#5764**)
88
182
 
89
183
  ## 🐛 Bug Fixes
90
184
 
91
- * **AxiosError:** Fixed `AxiosError.from` not copying the `status` field from the source error. (__#7403__)
185
+ - **AxiosError:** Fixed `AxiosError.from` not copying the `status` field from the source error. (**#7403**)
92
186
 
93
- * **AxiosError:** Made the `message` property enumerable so it appears in `JSON.stringify` output and `Object.keys`. (__#7392__)
187
+ - **AxiosError:** Made the `message` property enumerable so it appears in `JSON.stringify` output and `Object.keys`. (**#7392**)
94
188
 
95
- * **FormData Detection:** Corrected safe FormData detection for WeChat Mini Program environments. (__#7324__)
189
+ - **FormData Detection:** Corrected safe FormData detection for WeChat Mini Program environments. (**#7324**)
96
190
 
97
- * **React Native / Browserify Export:** Fixed broken module export that caused import failures in React Native and Browserify. (__#7386__)
191
+ - **React Native / Browserify Export:** Fixed broken module export that caused import failures in React Native and Browserify. (**#7386**)
98
192
 
99
193
  ## 🔧 Maintenance & Chores
100
194
 
101
- * **Dependencies:** Migrated `@rollup/plugin-babel` from v5 to v6 and bumped the development dependencies group. (__#7424__, __#7432__)
195
+ - **Dependencies:** Migrated `@rollup/plugin-babel` from v5 to v6 and bumped the development dependencies group. (**#7424**, **#7432**)
102
196
 
103
197
  ## 🌟 New Contributors
104
198
 
105
199
  We are thrilled to welcome our new contributors. Thank you for helping improve axios:
106
200
 
107
- * **@moh3n9595** (__#5764__)
108
- * **@skrtheboss** (__#7403__)
109
- * **@ybbus** (__#7392__)
110
- * **@Shiwaangee** (__#7324__)
111
- * **@Gudahtt** (__#7386__)
201
+ - **@moh3n9595** (**#5764**)
202
+ - **@skrtheboss** (**#7403**)
203
+ - **@ybbus** (**#7392**)
204
+ - **@Shiwaangee** (**#7324**)
205
+ - **@Gudahtt** (**#7386**)
112
206
 
113
207
  [Full Changelog](https://github.com/axios/axios/compare/v1.13.5...v1.13.6)
114
208
 
115
209
  ---
116
210
 
117
- ## v1.13.5 February 8, 2026
211
+ ## v1.13.5 - February 8, 2026
118
212
 
119
213
  This release patches a prototype pollution denial-of-service vulnerability, fixes a missing `status` field regression in `AxiosError`, adds interceptor ordering control, and introduces URL validation for `isAbsoluteURL`.
120
214
 
121
215
  ## 🔒 Security Fixes
122
216
 
123
- * **Prototype Pollution (DoS):** Hardened `mergeConfig` to ignore `__proto__`, `constructor`, and `prototype` keys, preventing denial-of-service via prototype pollution when merging user-supplied config. (__#7369__)
217
+ - **Prototype Pollution (DoS):** Hardened `mergeConfig` to ignore `__proto__`, `constructor`, and `prototype` keys, preventing denial-of-service via prototype pollution when merging user-supplied config. (**#7369**)
124
218
 
125
219
  ## 🚀 New Features
126
220
 
127
- * **`isAbsoluteURL` Validation:** Added input validation to `isAbsoluteURL` to handle malformed or unexpected input gracefully. (__#7326__)
221
+ - **`isAbsoluteURL` Validation:** Added input validation to `isAbsoluteURL` to handle malformed or unexpected input gracefully. (**#7326**)
128
222
 
129
223
  ## 🐛 Bug Fixes
130
224
 
131
- * **AxiosError `status`:** Restored the `status` field on `AxiosError` instances, which was missing in v1.13.3 and later. (__#7368__)
225
+ - **AxiosError `status`:** Restored the `status` field on `AxiosError` instances, which was missing in v1.13.3 and later. (**#7368**)
132
226
 
133
- * **Interceptor Ordering:** Added a `useLegacyInterceptorOrder` option to restore pre-v1.13 interceptor execution order for applications relying on the previous behaviour. ([569f028](https://github.com/axios/axios/commit/569f028a5878faaec8d7d138ba686aac407bda4c))
227
+ - **Interceptor Ordering:** Added a `useLegacyInterceptorOrder` option to restore pre-v1.13 interceptor execution order for applications relying on the previous behaviour. ([569f028](https://github.com/axios/axios/commit/569f028a5878faaec8d7d138ba686aac407bda4c))
134
228
 
135
229
  ## 🔧 Maintenance & Chores
136
230
 
137
- * **CI:** Fixed run conditions and updated workflow YAMLs. (__#7372__, __#7373__)
231
+ - **CI:** Fixed run conditions and updated workflow YAMLs. (**#7372**, **#7373**)
138
232
 
139
- * **Dependencies:** Bumped `karma-sourcemap-loader` and minor package versions. (__#7356__, __#7360__)
233
+ - **Dependencies:** Bumped `karma-sourcemap-loader` and minor package versions. (**#7356**, **#7360**)
140
234
 
141
235
  ## 🌟 New Contributors
142
236
 
143
237
  We are thrilled to welcome our new contributors. Thank you for helping improve axios:
144
238
 
145
- * **@asmitha-16** (__#7326__)
239
+ - **@asmitha-16** (**#7326**)
146
240
 
147
241
  [Full Changelog](https://github.com/axios/axios/compare/v1.13.4...v1.13.5)
148
242
 
149
243
  ---
150
244
 
151
- ## v1.13.4 January 27, 2026
245
+ ## v1.13.4 - January 27, 2026
152
246
 
153
247
  Patch release fixing regressions introduced in v1.13.3, including TypeScript export compatibility and CI/build stability.
154
248
 
155
249
  ## 🐛 Bug Fixes
156
250
 
157
- * **v1.13.3 Regressions:** Fixed multiple issues introduced by the v1.13.3 release, including broken merge configs. (__#7352__)
251
+ - **v1.13.3 Regressions:** Fixed multiple issues introduced by the v1.13.3 release, including broken merge configs. (**#7352**)
158
252
 
159
- * **TypeScript Exports:** Corrected TypeScript export declarations to restore proper type resolution. (__#4884__)
253
+ - **TypeScript Exports:** Corrected TypeScript export declarations to restore proper type resolution. (**#4884**)
160
254
 
161
255
  ## 🔧 Maintenance & Chores
162
256
 
163
- * **CI & Build:** Refactored CI pipeline and build configuration for stability. (__#7340__)
257
+ - **CI & Build:** Refactored CI pipeline and build configuration for stability. (**#7340**)
164
258
 
165
259
  [Full Changelog](https://github.com/axios/axios/compare/v1.13.3...v1.13.4)
166
260