axios
1.21.1 · 9 Nov 2026MIT150.1M / weekRepositoryHomepagenpmAtom feed
Upgrading axios From 1.2.5 to 1.20.0
60 releases in betweennotes for 59
Counted from 59 of 60 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking1.20.0
- Breaking1.14.0
- Breaking1.8.0
- Breaking1.8.0
- Breaking1.8.0
Security
Fixes 31 advisories affecting 1.2.5
- axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `config.proxy`high · GHSA-35jp-ww65-95wh
- axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollution Gadget in Config Mergehigh · GHSA-3g43-6gmg-66jw
- Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRFmoderate · GHSA-3p68-rc4w-qgx5
- Axios: Invisible JSON Response Tampering via Prototype Pollution Gadget in `parseReviver`moderate · GHSA-3w6x-2g7m-8v23
- Axios: Excessive recursion in formDataToJSON can cause denial of servicemoderate · GHSA-42h9-826w-cgv3
- Axios is Vulnerable to Denial of Service via __proto__ Key in mergeConfighigh · GHSA-43fc-jf86-j433
- Axios: CRLF Injection in multipart/form-data body via unsanitized blob.type in formDataToStreammoderate · GHSA-445q-vr5w-6q77
- Axios is vulnerable to DoS attack through lack of data size checkhigh · GHSA-4hjh-wcwx-xvwj
- 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 has Unrestricted Cloud Metadata Exfiltration via Header Injection Chainmoderate · GHSA-fvcv-3m26-pcqx
- 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: Header Injection via Inherited headers After Minimal Interceptormoderate · GHSA-j8rh-479h-cp32
- axios Requests Vulnerable To Possible SSRF and Credential Leakage via Absolute URLhigh · GHSA-jr5f-v2jv-69x6
- 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: 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 has prototype pollution read-side gadgets in HTTP adapter that allow credential injection and request hijackinghigh · GHSA-q8qp-cvcw-x6jj
- 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 Cross-Site Request Forgery Vulnerabilitymoderate · GHSA-wf5p-g6vw-rhxx
- 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
- 1.20.0
Runtime Option Handling: Hardened behavioral configuration reads against shared and foreign prototype pollution and normalized unsafe interceptor replacement objects. This also clarifies Fetch redirect and custom implementation behavior, HTTP/2 DNS and proxy handling, CIDR-based NO_PROXY matching, and malformed data URI rejection; see the PR for documented compatibility effects.
- 1.19.0
Multipart Form Data: Raised the form-data dependency floor to ^4.0.6, preventing fresh installations from resolving versions affected by the CRLF injection vulnerability GHSA-hmw2-7cc7-3qxx (github.com/advisories/GHSA-hmw2-7cc7-3qxx).
- 1.18.0
Redirect Header Safety: Added Node HTTP adapter support for stripping caller-specified sensitive headers on cross-origin redirects, helping prevent custom auth headers such as API keys from leaking to another origin. (#10892)
- 1.18.0
URL And Request Hardening: Rejects malformed
http:andhttps:URLs that omit//withERR_INVALID_URL, while tightening prototype-pollution-safe config reads, stream size limits, FormData depth handling, data URL sizing, and localNO_PROXYmatching. (#11000) - 1.17.0
Config Hardening: Guarded
socketPath,params, andparamsSerializerreads with own-property checks to prevent inherited prototype values from affecting request behavior, including SSRF-sensitive paths. (#10901, #10922) - 1.17.0
Release Publishing: Switched the publish workflow to npm staged publishing for safer, auditable package releases with provenance. (#10926)
- 1.16.1
This release ships a defence-in-depth fix for prototype pollution in
formDataToJSON, hardens proxy and CI workflows, restores Webpack 4 compatibility for the fetch adapter, and includes several small bug fixes and maintenance improvements. - 1.16.1
Prototype Pollution Defence-in-Depth: Hardened
formDataToJSONagainst already-pollutedObject.prototypeby walking own properties only, so attacker-controlled keys inherited from a poisoned prototype cannot propagate through deserialization. (#7413) - 1.16.1
Proxy Cleartext Leak: Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (#10858)
- 1.16.1
CI Cache Removal: Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (#10882)
Release by release
- Security
Runtime Option Handling: Hardened behavioral configuration reads against shared and foreign prototype pollution and normalized unsafe interceptor replacement objects. This also clarifies Fetch redirect and custom implementation behavior, HTTP/2 DNS and proxy handling, CIDR-based NO_PROXY matching, and malformed data URI rejection; see the PR for documented compatibility effects.
- Breaking
HTTP Status Naming: Added ContentTooLarge (413) and UnprocessableContent (422), while retaining PayloadTooLarge and UnprocessableEntity as backward-compatible deprecated aliases.
- Fixed
Interceptor Lifecycle: Prevented unbounded handler-array growth by trimming trailing ejected interceptors without changing iteration semantics, and kept interceptor operations safe when the public handlers field is nullish. (#11087, #11118)
- Fixed
Request Error Preservation: Prevented custom Error.prepareStackTrace implementations that return non-string values from replacing the original request failure with an unrelated TypeError.
- Fixed
XHR Reliability: Navigation-canceled requests now reject with ECONNABORTED instead of resolving with status 0, while successful downloads flush their final progress callback during the live loadend dispatch. (#11094, #11121)
- Fixed
Node.js Socket Memory: Removed request-context retention from per-socket error listeners, preventing completed response data from being pinned for the lifetime of pooled keep-alive sockets.
- Fixed
Core Methods and HTTP Errors: Prevented structural method-header buckets from leaking into outgoing headers, standardized invalid DNS lookup and httpVersion failures as AxiosError.ERR_BAD_OPTION_VALUE, and corrected the timeoutErrorMessage merge strategy.
- Security
- Security
Multipart Form Data: Raised the form-data dependency floor to ^4.0.6, preventing fresh installations from resolving versions affected by the CRLF injection vulnerability GHSA-hmw2-7cc7-3qxx (github.com/advisories/GHSA-hmw2-7cc7-3qxx).
- New
Configuration Extensibility: Preserved own-enumerable symbol-keyed fields through mergeConfig and added a generic params type across public TypeScript declarations, responses, errors, adapters, and serializers. (#11043, #11081)
- New
Header Parameter Parsing: Added the opt-in AxiosHeaders.parseParameters() parser for quote-aware, RFC-style HTTP parameter parsing while preserving legacy parsing behavior.
- New
HTTP Status Codes: Added the missing Cloudflare 520 WebServerReturnsAnUnknownError status and matching ESM/CJS declarations.
- Security
- Fixed
AxiosError Serialisation: Made AxiosError#cause non-enumerable to prevent circular JSON serialisation failures when errors include nested causes.
- Fixed
Node HTTP Adapter: Guarded socket.setKeepAlive for proxy agent streams, accepted path-only URLs when socketPath is configured, deferred environment proxy handling to Node, and explicitly passed maxBodyLength through to follow-redirects. (#10917, #10930, #10942, #10993)
- Fixed
Runtime and Type Correctness: Fixed several runtime crashes, type definition mismatches, and incorrect error handling paths. (#10959, #11021)
- Fixed
AxiosURLSearchParams: Switched the encoder callback to an arrow function so
encoder.call(this)receives theAxiosURLSearchParamsinstance correctly.
- Fixed
- Security
Redirect Header Safety: Added Node HTTP adapter support for stripping caller-specified sensitive headers on cross-origin redirects, helping prevent custom auth headers such as API keys from leaking to another origin. (#10892)
- Security
URL And Request Hardening: Rejects malformed
http:andhttps:URLs that omit//withERR_INVALID_URL, while tightening prototype-pollution-safe config reads, stream size limits, FormData depth handling, data URL sizing, and localNO_PROXYmatching. (#11000) - New
Status Validation: Added
transitional.validateStatusUndefinedResolvesso applications can opt in to treatingvalidateStatus: undefinedlike the option was omitted, whilevalidateStatus: nullremains the explicit way to accept every status. (#10899)
- Security
- Security
Config Hardening: Guarded
socketPath,params, andparamsSerializerreads with own-property checks to prevent inherited prototype values from affecting request behavior, including SSRF-sensitive paths. (#10901, #10922) - Security
Release Publishing: Switched the publish workflow to npm staged publishing for safer, auditable package releases with provenance. (#10926)
- New
HTTP Compression: Added Node HTTP adapter support for zstd response decompression, with
transitional.advertiseZstdAcceptEncodingcontrolling whetherzstdis advertised inAccept-Encoding. (#6792, #10920) - Fixed
Authentication Handling: Restored Basic auth on same-origin Node redirects while continuing to strip credentials cross-origin, and aligned the fetch adapter with HTTP adapter behavior for URL-embedded Basic auth. (#10929, #10896)
- Security
- Security
This release ships a defence-in-depth fix for prototype pollution in
formDataToJSON, hardens proxy and CI workflows, restores Webpack 4 compatibility for the fetch adapter, and includes several small bug fixes and maintenance improvements. - Security
Prototype Pollution Defence-in-Depth: Hardened
formDataToJSONagainst already-pollutedObject.prototypeby walking own properties only, so attacker-controlled keys inherited from a poisoned prototype cannot propagate through deserialization. (#7413) - Security
Proxy Cleartext Leak: Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (#10858)
- Security
CI Cache Removal: Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (#10882)
- Security
- New
QUERY HTTP Method: Added support for the QUERY HTTP method across adapters and type definitions. (#10802)
- New
ECONNREFUSED Error Constant: Exposed
ECONNREFUSEDas a constant onAxiosErrorso callers can match connection-refused failures without comparing string literals (closes #6485). (#10680) - New
Encode Helper Export: Exported the internal
encodehelper frombuildURLso userland param serializers can reuse the same encoding logic that axios uses internally. (#6897) - Fixed
Fetch adapter now enforces
maxBodyLengthandmaxContentLength. These limits were silently ignored on the fetch adapter prior to 1.16.0 — anyone relying on them as a safety net (DoS protection, accidental large uploads) had no protection. (#10795)
- New
- Security
This release delivers prototype-pollution hardening for the Node HTTP adapter, adds an opt-in
allowedSocketPathsallowlist to mitigate SSRF via Unix domain sockets, fixes a keep-alive socket memory leak, and ships supply-chain hardening across CI and security docs. - Security
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 pollutedauth,baseURL,socketPath,beforeRedirect, andinsecureHTTPParserfrom influencing requests. (#10779) - Security
SSRF via
socketPath: Rejects non-stringsocketPathvalues and adds an opt-inallowedSocketPathsconfig option to restrict permitted Unix domain socket paths, returningAxiosErrorERR_BAD_OPTION_VALUEon mismatch. (#10777) - Security
Supply-chain Hardening: Added
.npmrcwithignore-scripts=true, lockfile lint CI, non-blocking reproducible build diff, scoped CODEOWNERS, expandedSECURITY.md/THREATMODEL.mdwith provenance verification (npm audit signatures), 60-day resolution policy, and maintainer incident-response runbook. (#10776) - Fixed
Keep-alive Socket Memory Leak: Installs a single per-socket
errorlistener tracking the active request viakAxiosSocketListener/kAxiosCurrentReq, eliminating per-request listener accumulation,MaxListenersExceededWarning, and linear heap growth under concurrent or long-running keep-alive workloads (fixes #10780). (#10788)
- Security
12 other lines we could not sort, mostly version bumps
- 1.16.0
Basic auth credentials embedded in URLs are now URL-decoded. If you have percent-encoded credentials in a URL (e.g.
https://user:p%40ss@host), the decoded value is what now goes on the wire. (#10825) - 1.16.0
transformRequestinput typing change was reverted. The typing change introduced in #10745 was reverted in #10810 after follow-up review — net behavior is unchanged from 1.15.2. (#10745, #10810) - 1.15.0
Deprecation:
url.parse()usage has been replaced to address Node.js deprecation warnings. If you are on a recent version of Node.js, this resolves console warnings you may have been seeing. (#10625) - 1.14.0
Action Required: If you rely on env-based proxy behaviour or CJS resolution edge-cases, validate your integration after upgrade (notably
proxy-from-envv2 alignment andmainentry compatibility fix). - 1.13.6
Action Required: Users targeting React Native should verify their integration, particularly if relying on specific Blob or FormData behaviours, as improvements have been made to support these objects.
- 1.13.6
AxiosError.message is now correctly enumerable.
- 1.13.6
AxiosError.from now correctly copies the status property from the source error, ensuring better error propagation.
- 1.13.5
Dev deps: bump
karma-sourcemap-loaderfrom 0.3.8 to 0.4.0. (PR #7360) - 1.13.3
- 1.13.3
deps: bump peter-evans/create-pull-request from 7 to 8 in the github-actions group
65 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.