axios
1.21.1 · 9 Nov 2026MIT150.1M / weekRepositoryHomepagenpmAtom feed
Upgrading axios From 0.31.0 to 0.34.0
4 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- Breaking0.34.0
- Breaking0.34.0
- Breaking0.32.0
- Breaking0.32.0
- Breaking0.31.1
Security
Fixes 23 advisories affecting 0.31.0
- axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollution Gadget in Config Mergehigh · GHSA-3g43-6gmg-66jw
- Axios: Excessive recursion in formDataToJSON can cause denial of servicemoderate · GHSA-42h9-826w-cgv3
- Axios' HTTP adapter-streamed uploads bypass maxBodyLength when maxRedirects: 0moderate · GHSA-5c9x-8gcm-mpgx
- Axios: unbounded recursion in toFormData causes DoS via deeply nested request datamoderate · GHSA-62hf-57xw-28j9
- Axios: Header Injection via Prototype Pollutionhigh · GHSA-6chq-wfr3-2hj9
- Axios: Nested axios option objects can consume polluted prototype valuesmoderate · GHSA-7q8q-rj6j-mhjq
- axios has DoS & Header Injection via Prototype Pollution Read-Side Gadgets in axios merge functionsmoderate · GHSA-898c-q2cr-xwhg
- Axios: Prototype-Pollution Gadget in the Default Instance Allows Inherited Object.prototype.method to Override HTTP Methodmoderate · GHSA-9fr6-4gfg-395g
- Axios: NO_PROXY bypass for 0.0.0.0 local addresses in axiosmoderate · GHSA-f4gw-2p7v-4548
- Axios: Regular Expression Denial of Service (ReDoS) via Cookie Name Injectionhigh · GHSA-hfxv-24rg-xrqf
- Axios: Proxy-Authorization header leaks to redirect target when proxy is re-evaluated to direct connectionhigh · GHSA-j5f8-grm9-p9fc
- Axios: no_proxy bypass via IP alias allows SSRFmoderate · GHSA-m7pr-hjqh-92cm
- Axios: Prototype pollution gadgets can alter axios request constructionmoderate · GHSA-mmx7-hfxf-jppx
- Axios: Proxy-Authorization Credential Leak to Origin Server Across HTTP-to-HTTPS Redirect in Axios Node.js HTTP Adapterhigh · GHSA-p92q-9vqr-4j8v
- Axios: Prototype Pollution Gadgets - Response Tampering, Data Exfiltration, and Request Hijackinghigh · GHSA-pf86-5x62-jrwf
- axios's shouldBypassProxy does not recognize IPv4-mapped IPv6 addresses, allowing NO_PROXY bypass (incomplete fix for CVE-2025-62718)high · GHSA-pjwm-pj3p-43mv
- Axios: Deep formToJSON Key Recursion Can Cause Denial of Servicemoderate · GHSA-pmv8-rq9r-6j72
- Axios: Incomplete Fix for CVE-2025-62718 — NO_PROXY Protection Bypassed via RFC 1122 Loopback Subnet (127.0.0.0/8) in Axios 1.15.0high · GHSA-pmwg-cvhr-8vh7
- Axios: HTTP adapter streamed responses bypass maxContentLengthmoderate · GHSA-vf2m-468p-8v99
- Axios: Authentication Bypass via Prototype Pollution Gadget in `validateStatus` Merge Strategymoderate · GHSA-w9j2-pvgh-6h63
- Axios: Prototype Pollution Gadget in axios toFormData Optionshigh · GHSA-x97p-jq2g-jp4f
- Axios: Null Byte Injection via Reverse-Encoding in AxiosURLSearchParamslow · GHSA-xhjh-pmcv-23jw
- Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in `withXSRFToken` Boolean Coercionmoderate · GHSA-xx6v-rp6x-q39c
- 0.34.0
Request Configuration: Prevent inherited properties from influencing form serializer options, default request methods, headers on interceptor-returned configs, and HTTP redirect hooks. Applications relying on inherited options must define those values as own properties.
- 0.34.0
Hostname Processing: Replace quadratic regular-expression backtracking in proxy bypass hostname normalization with a linear scan, preventing excessive processing of crafted redirect hostnames.
- 0.33.0
Request Config Hardening: Uses own-property reads for nested request options affecting auth, params, proxy, and data handling; adds bounded form serialisation depth checks; normalises nullish Basic Auth credentials; and treats
0.0.0.0as local for proxy bypass. (#11001) - 0.32.0
Default error redaction: AxiosError.toJSON() now redacts sensitive keys by default to prevent credential leaks in logs. The behavior is configurable via config.redact, with defaults exposed on defaults.redact.
- 0.32.0
Cookie & XSRF handling: Cookie names are read literally rather than via regex, and only own properties are respected when evaluating withXSRFToken.
- 0.32.0
Proxy bypass IPv6 parity: NO_PROXY matching now handles canonical IPv4-mapped IPv6 forms such as ::ffff:127.0.0.1 and ::ffff:7f00:1.
- 0.32.0
Node http adapter hardening: Strips Proxy-Authorization when no proxy is in use and gates socketPath behind a new allowedSocketPaths allowlist (string or array, normalized) to reduce accidental Unix socket exposure.
- 0.32.0
Browser xhr adapter: Stricter own-property checks when reading config and headers.
- 0.32.0
URL parameters: AxiosURLSearchParams keeps %00 encoded and applies consistent encoding throughout.
- 0.32.0
Public type surface: Adds formDataHeaderPolicy, redact, and allowedSocketPaths to the TypeScript declarations alongside their runtime defaults.
Release by release
- Security
Request Configuration: Prevent inherited properties from influencing form serializer options, default request methods, headers on interceptor-returned configs, and HTTP redirect hooks. Applications relying on inherited options must define those values as own properties.
- Security
Hostname Processing: Replace quadratic regular-expression backtracking in proxy bypass hostname normalization with a linear scan, preventing excessive processing of crafted redirect hostnames.
- Breaking
Header Types: TypeScript now rejects header values that are Promises, functions, or objects with custom toString() methods. Resolve promises, call functions, or explicitly convert objects before assigning header values. Supported scalar, array, and grouped headers remain available.
- Breaking
Proxy Routing: NO_PROXY / no_proxy entries now support IPv4 and IPv6 CIDR ranges. Previously ineffective ranges now cause matching IP destinations to bypass the proxy; review existing ranges when upgrading.
- Security
- Security
Request Config Hardening: Uses own-property reads for nested request options affecting auth, params, proxy, and data handling; adds bounded form serialisation depth checks; normalises nullish Basic Auth credentials; and treats
0.0.0.0as local for proxy bypass. (#11001) - New
Node.js 26: Adds Node.js 26 to the v0.x CI and release/publish matrices. (#10937)
- Security
- Security
Default error redaction: AxiosError.toJSON() now redacts sensitive keys by default to prevent credential leaks in logs. The behavior is configurable via config.redact, with defaults exposed on defaults.redact.
- Security
Cookie & XSRF handling: Cookie names are read literally rather than via regex, and only own properties are respected when evaluating withXSRFToken.
- Security
Proxy bypass IPv6 parity: NO_PROXY matching now handles canonical IPv4-mapped IPv6 forms such as ::ffff:127.0.0.1 and ::ffff:7f00:1.
- Security
Node http adapter hardening: Strips Proxy-Authorization when no proxy is in use and gates socketPath behind a new allowedSocketPaths allowlist (string or array, normalized) to reduce accidental Unix socket exposure.
- Security
- Security
This release backports a broad set of security hardenings from the v1 line — covering prototype-pollution defences, stream size enforcement, XSRF handling, URL null-byte encoding, and bounded FormData recursion — and drops committed
dist/artefacts along with Bower support. - Security
Prototype Pollution in Header Merge (GHSA-6chq-wfr3-2hj9): Tightened
isFormDatato reject plain/null-prototype objects and requireappend, and guarded the Node HTTP adapter sodata.getHeaders()is only merged when it is not inherited fromObject.prototype. Blocks injected headers via pollutedgetHeaders. (#10750) - Security
Prototype Pollution in Config Merging (GHSA-pf86-5x62-jrwf):
mergeConfig, defaults resolution, and the HTTP adapter now uses own-property checks fortransport,env,Blob,formSerializer, and transforms arrays, and merged configs are returned as null-prototype objects. Prevents hijacking of the request flow through polluted prototypes. (#10752) - Security
FormData / Params Recursion DoS: Added a configurable
maxDepth(default100,Infinitydisables) totoFormDataand params serialisation, throwingAxiosErrorwith codeERR_FORM_DATA_DEPTH_EXCEEDEDwhen exceeded. Circular-reference detection is preserved. (#10728) - Security
Null-Byte Injection in Query Strings: Removed the unsafe
%00→ null-byte substitution fromAxiosURLSearchParams.encodeso%00is preserved as-is. Other encoding behaviour (including%20→+) unchanged. (#10737) - Security
Consolidated v1 Security Backport: Rolls up remaining v1 hardenings into
v0.x:maxContentLengthenforcement forresponseType: 'stream'via a guarded transform with deferred piping,maxBodyLengthenforcement for streamed uploads on nativehttp/httpswithmaxRedirects: 0, and stricterwithXSRFTokenhandling so only own booleantrueenables cross-origin XSRF headers. (#10764) - Breaking
Bower & Committed
dist/Removed:dist/bundles are no longer committed to the repo, andbower.jsonplus the Gruntpackage2bowertask have been removed. CI still builds bundles before publish, so npm/yarn/pnpm consumers are unaffected; installs via Bower or directly from the git tree must migrate to npm or a CDN. (#10747)
- Security
8 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.