Repository navigation
Conversation
Snyk has created this PR to upgrade axios from 1.20.0 to 1.21.0. See this package in npm: axios See this project in Snyk: https://app.snyk.io/org/devrev/project/e563404f-f830-4425-a71c-280a166b0c8e?utm_source=github&utm_medium=referral&page=upgrade-pr
|
This minor version upgrade contains a specific, documented breaking change related to the handling of default headers. Breaking Change: Header Defaults Starting with v1.21.0, only plain objects, null-prototype maps, and compatible Action Required: If your application uses custom class instances to define default headers (e.g., in This release also introduces new features, including response duration timing and opt-in UTF-8 support for Basic authentication, alongside various bug fixes. Source: GitHub Release Notes v1.21.0
|
|
| Detector | Location | Commit | Verified |
|---|---|---|---|
| SnykKey | commit message | 2425cfc |
no |
If a finding is a false positive, add it to .devrev/creds.yml to suppress it:
allow:
- path: "path/to/file"
lines: "12,40-42"
Snyk has created this PR to upgrade axios from 1.20.0 to 1.21.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released 22 days ago.
Breaking Change Risk
Release notes
Package name: axios
-
1.21.0 - 2026-10-27
⚠️ Breaking Changes & Deprecations
- Header Defaults: Only plain objects, null-prototype maps, and compatible
- Response Timing: Added
- UTF-8 Basic Authentication: Added
- Fetch Compatibility: Restored requests in runtimes such as Cloudflare Workers that reject the implicit
- Runtime Consistency: Aligned encoded-byte size accounting, multipart uploads, proxy routing, same-origin resolution, parameter merging, and form serialization across adapters. Circular parameters now reject with
- Header Handling: Preserved headers named
- URL and Data URL Parsing: Accepted case-insensitive supported URL schemes and Base64 markers, and corrected decoding of percent-encoded Base64 data URLs. Node data URL allocation estimates remain aligned with decoding so configured size limits apply before allocation. (#11138, #11163, #11294)
- Error Diagnostics: Preserved short reconstructed request stacks and appended wrapped error stacks under
- Interceptor Removal: Restored removal through canonical numeric-string interceptor IDs, including after registry compaction. (#11139)
- Proxy TLS: HTTPS CONNECT tunnels now apply current origin TLS options from an explicit
- XHR Lifecycle: Used asynchronous Cookie Store reads for XSRF tokens where supported, preserving cookie fallback, timeout accounting, and cancellation. Upload and download progress listeners are now removed on completion, failure, timeout, and cancellation. (#11166, #11225)
- HTTP/2 Sessions: Stopped reusing sessions immediately after GOAWAY and prevented draining sessions from scheduling idle timers that could delay process exit. (#11210)
- TypeScript Declarations: Exposed the response-default marker as a public type to resolve
- Configuration Performance: Reduced request configuration merge overhead, particularly for requests with many headers, while preserving merge semantics and prototype-pollution guards. (#11208)
- Same-Origin Checks: Removed obsolete Internet Explorer detection without changing origin decisions in supported environments. (#11174)
- Dependencies: Updated
- Documentation: Fixed interceptor test links, updated README CDN examples to the published 1.20.0 bundle, and corrected guidance on interceptor options and request lifecycle ordering. (#11228, #11149, #11335)
- Contributor Workflow: Consolidated agent instructions in
- Sponsors and Support: Added HeroDevs, Code for Japan, and Sweepico sponsor listings, refreshed sponsor data, and documented extended security support for Axios v0. (#11222, #11249, #11252, #11341)
- Proxy Regression Coverage: Added a long dotted request-hostname test for
- Release Preparation: Updated package version metadata for 1.21.0. (#11346)
- @ lazerg (#11194)
- @ QIU-Guanzong (#11228)
- @ Iams4kura (#11125)
- @ vjymisal0 (#11179)
- @ jarrensj (#11238)
- @ LineGu (#11132)
- @ luantaraschi (#11134)
- @ Cyberhet (#11284)
- @ nyxst4ck (#11138)
- @ windcrestai (#11163)
- @ kazuki-netizen (#11294)
- @ bilashcse (#11139)
- @ JiuYue0820 (#11149)
- @ official-burak (#11156)
- @ contactjawad (#11159)
- @ wittachai-as (#11174)
- @ yiheng-kkk (#11166)
- @ ShikeChen01 (#11208)
- @ cuishuang (#11210)
- @ Truenocancion (#11225)
- @ jakezwang (#11216)
- @ Adityagarg2712 (#11214)
- @ Zandereins (#11235)
- @ Plastic-time (#11335)
-
1.20.0 - 2026-08-26
⚠️ Breaking Changes & Deprecations
- HTTP Status Naming: Added ContentTooLarge (413) and UnprocessableContent (422), while retaining PayloadTooLarge and UnprocessableEntity as backward-compatible deprecated aliases. (#11082)
- 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. (#11141)
- 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. (#11109)
- 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. (#11091)
- 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. (#11096)
- Dependencies: Updated fast-uri, postcss, js-yaml, mocha, development-tooling groups, and GitHub Actions dependencies. (#11092, #11098, #11099, #11106, #11107, #11122, #11123, #11126, #11127, #11133, #11140, #11143, #11144)
- Documentation: Applied the v1.19.0 documentation updates, added the missing fs import to the README stream example, introduced localized global search, and repaired the interceptor test link. (#11101, #11113, #11097, #11119)
- Sponsorship: Updated sponsorship links and data and added ScrapingBee as a sponsor. (#11124, #11136, #11137)
- CI and Release: Switched ESM smoke tests to locked dependencies and synchronized package and runtime version metadata for v1.20.0. (#11128, #11152)
- @ yens1 (#11109)
- @ Sasireddy001 (#11113)
- @ ari-token-security (#11094)
- @ timothyokooboh (#11097)
- @ gi9439041-png (#11119)
- @ Hashim1999164 (#11082)
- @ v-dev-cl (#11091)
- @ r0h1tb (#11118)
- @ ostapondo (#11121)
from axios GitHub release notesv1.21.0 — October 21, 2026
This release adds response timing and opt-in UTF-8 Basic authentication, improves request handling across runtimes, and changes how header defaults are recognized.
AxiosHeadersinstances are treated as common or method-specific defaults; literal headers such asLinkare now preserved. Applications using custom class instances as defaults must convert them to plain maps, for example{ post: { ...customDefaults } }, or compatibleAxiosHeaders. Otherwise, those instances become literal header values, including on requests using other methods. (#11156)🚀 New Features
response.duration, in milliseconds, including onerror.responsewhen present. Timing measures adapter execution and excludes interceptors and transforms; streamed responses stop timing when the stream becomes available. Axios replaces any existingdurationvalue supplied by a custom adapter. (#11214)transitional.encodeBasicAuthUsername: trueto support Unicode usernames in XHR and Fetch requests. The option defaults tofalse, preserving existing authentication behavior; applications opting in should supply the original Unicode username and remove manual pre-encoding workarounds. (#11159)🐛 Bug Fixes
cache: 'default', while preserving explicit caller settings. Response-size failures now retain their originalERR_BAD_RESPONSEand request context when runtime wrappers replace the underlying stream error. (#11194, #11179)ERR_BAD_OPTION_VALUE, and sparse or non-index numeric form fields serialize as keyed objects. Withproxy: false, nativeproxyEnvagents using unsupported pool-management or TLS-session lifecycle overrides now reject withERR_BAD_OPTION_VALUE; construct those agents withoutproxyEnv. (#11242)__proto__using safe casing without changing theAxiosHeadersinstance prototype. Function matchers inhas(),delete(), andclear()now receive the headers instance asthis, matching their declared contract. (#11134, #11216)Caused by:so tooling that reads onlyerror.stackretains the original failure context. (#11132, #11142)httpsAgent, or fromhttps.globalAgentwhen no explicit agent is supplied. This preserves process-wide custom CA settings through proxy tunnels. (#11178)TS2527when consumers emit declarations involving unresolved response generics, covering both ESM and CommonJS. (#11125)🔧 Maintenance & Chores
follow-redirectsto 1.16.1 and refreshed development, documentation, test, and GitHub Actions dependencies. Removed unuseddayjsfrom the docs package, rootchalk, andchaifrom CJS module tests. (#11169, #11188, #11189, #11195, #11212, #11213, #11218, #11220, #11221, #11230, #11234, #11244, #11245, #11266, #11267, #11268, #11269, #11270, #11271, #11272, #11298, #11302, #11303, #11304, #11305, #11306, #11313, #11321, #11322, #11323, #11342)AGENTS.md, standardized PR labels, required prerelease notes and validation evidence, and clarified thatnpm testrequires installed Playwright browsers. (#11238, #11273, #11223, #11284)NO_PROXYhandling, extending coverage of an existing denial-of-service fix. (#11235)🌟 New Contributors
Welcome to our 24 new contributors. Thank you for helping improve Axios:
Full Changelog
v1.20.0 — August 19, 2026
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.
🔒 Security Fixes
🐛 Bug Fixes
🔧 Maintenance & Chores
🌟 New Contributors
We are thrilled to welcome our new contributors. Thank you for helping improve axios:
Full Changelog (v1.19.0...v1.20.0)
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: