Packages

axios

1.21.1 · 9 Nov 2026MIT150.1M / weekRepositoryHomepagenpmAtom feed

Upgrading axios From 0.31.1 to 0.34.0

3 releases in betweenevery note read

Other targets from 0.31.1Newest 0.x0.35.0Latest1.21.1
  1. 0.31.1yours
  2. 0.32.0security
  3. 0.33.0security
  4. 0.34.0target

Before you upgrade

Tick each one off as you go
  • Breaking0.34.0
  • Breaking0.34.0
  • Breaking0.32.0
  • Breaking0.32.0

Security

Fixes 14 advisories affecting 0.31.1

  • 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.34.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.0 as local for proxy bypass. (#11001)

    0.33.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.

    0.32.0

Release by release

  1. 0.34.0

    Security fix16 Sep 20262 new · 3 fixes
    • 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.

  2. 0.33.0

    Security fix14 Jun 20261 new
    • 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.0 as local for proxy bypass. (#11001)

    • New

      Node.js 26: Adds Node.js 26 to the v0.x CI and release/publish matrices. (#10937)

  3. 0.32.0

    Security fix4 May 2026
    • 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.

7 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.