axios
1.21.1 · 9 Nov 2026MIT150.1M / weekRepositoryHomepagenpmAtom feed
Upgrading axios From 0.31.0 to 0.31.1
1 release in betweenevery note read
- 1
- change to make
- 11
- advisories fixed
- 0
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking0.31.1
Security
14 advisories still affect 0.31.1
- Axios: Excessive recursion in formDataToJSON can cause denial of servicemoderate · GHSA-42h9-826w-cgv3
- 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
Upgrading to 0.34.0 clears them.
Fixes 11 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' 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: no_proxy bypass via IP alias allows SSRFmoderate · GHSA-m7pr-hjqh-92cm
- Axios: Prototype Pollution Gadgets - Response Tampering, Data Exfiltration, and Request Hijackinghigh · GHSA-pf86-5x62-jrwf
- 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: 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.31.1
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. - 0.31.1
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) - 0.31.1
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) - 0.31.1
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) - 0.31.1
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) - 0.31.1
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)
1 internal line (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.