axios
1.21.1 · 9 Nov 2026MIT150.1M / weekRepositoryHomepagenpmAtom feed
1.21.1 is the newest release of 1.x.
Summary· from the note as AI read it
Security fixUpgrade: this release fixes a security issue.
Deprecated
- Replace PayloadTooLarge/UnprocessableEntity with ContentTooLarge/UnprocessableContent
Security
- Upgrade for prototype pollution hardening; review documented compatibility effects in PR
In short
1 security1 deprecated5 fixed4 internal
- Deprecated
HTTP Status Naming: Added ContentTooLarge (413) and UnprocessableContent (422), while retaining PayloadTooLarge and UnprocessableEntity as backward-compatible deprecated aliases.
Security
Fixes 12 advisories that affected 1.19.0
- HighAxios: Node HTTP adapter prototype-pollution gadget allows request socket hijack via inherited createConnectionGHSA-m8m8-qj5v-23w3 · 30 Sep 2026Fixed in 1.20.0
- HighAxios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRFGHSA-r4gj-5m52-g5wh · 30 Sep 2026Fixed in 1.20.0
- HighAxios: ReDoS in fromDataURI data: URL parser freezes the Node event loop (DoS)GHSA-c29m-xwm3-cm6r · 30 Sep 2026Fixed in 1.20.0
- HighAxios: ReDoS (O(N²)) in shouldBypassProxy host normalization, reachable via untrusted redirect LocationGHSA-mghh-pgcx-3jjj · 30 Sep 2026Fixed in 1.20.0
- HighAxios: Prototype Pollution Gadget in axios toFormData OptionsGHSA-x97p-jq2g-jp4f · 30 Sep 2026Fixed in 1.20.0
- HighAxios: HTTP/2 adapter bypasses configured DNS lookup and proxy controlsGHSA-3pq3-5fj3-cg6v · 30 Sep 2026Fixed in 1.20.0
- HighAxios: Denial of Service via Unhandled 'error' Event in HTTP/2 ClientHttp2Session InitializationGHSA-542g-h47m-68v8 · 30 Sep 2026Fixed in 1.20.0
- ModerateAxios: Header Injection via Inherited headers After Minimal InterceptorGHSA-j8rh-479h-cp32 · 30 Sep 2026Fixed in 1.20.0
- ModerateAxios: Fetch Adapter Header Injection via Inherited FormData getHeadersGHSA-4hqw-qxg8-jxx2 · 30 Sep 2026Fixed in 1.20.0
- ModerateAxios: CIDR-form NO_PROXY entries are ignored, causing proxy exclusion bypass for internal IP rangesGHSA-44g4-m2mj-wpvx · 30 Sep 2026Fixed in 1.20.0
- ModerateAxios: Prototype pollution gadget in fetch adapter can alter outbound requestsGHSA-vh66-26gq-q6x8 · 30 Sep 2026Fixed in 1.20.0
- ModerateAxios: Prototype-Pollution Gadget in the Default Instance Allows Inherited Object.prototype.method to Override HTTP MethodGHSA-9fr6-4gfg-395g · 30 Sep 2026Fixed in 1.20.0
Release note
This release hardens runtime option handling, adds RFC 9110 status-code aliases, fixes Node.js and XHR reliability issues, and refreshes project tooling and documentation.
Breaking Changes & Deprecations
- Breaking
HTTP Status Naming: Added ContentTooLarge (413) and UnprocessableContent (422), while retaining PayloadTooLarge and UnprocessableEntity as backward-compatible deprecated aliases.
Security Fixes
- 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.
Bug Fixes
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)
Request Error Preservation: Prevented custom Error.prepareStackTrace implementations that return non-string values from replacing the original request failure with an unrelated TypeError.
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)
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.
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.
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.