Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. axios
  4. ›
  5. CVE-2026-101907

CVE-2026-101907: Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF

September 30, 2026

Axios exposes maxRedirects to limit redirect following, and maxRedirects: 0 is used by applications as a redirect-based SSRF guard. The Node HTTP adapter enforces this option. The fetch adapter does not read it and does not set a Fetch API redirect mode, so the runtime default of redirect: 'follow' applies.

Applications are affected when they rely on maxRedirects: 0 and use the fetch adapter, either explicitly or because the runtime selects it.

Axios 1.17.0 exposes maxRedirects as a configuration option to limit redirect following, and setting it to 0 is a documented pattern for preventing redirect-based SSRF. The HTTP adapter enforces this via follow-redirects. The fetch adapter does not read maxRedirects at all - it passes requests to the underlying fetch() call with no redirect option, which defaults to 'follow', so redirects are followed by the runtime rather than being constrained by axios maxRedirects.

In the attached PoC, a request issued with maxRedirects: 0 and adapter: 'fetch' follows a 302 redirect to an internal service and returns its response, while the same request with adapter: 'http' correctly throws. A second bypass case demonstrates that the redirect can reach a state-changing internal endpoint, not just read-only ones, proving both confidentiality and integrity impact.

This affects any application that sets maxRedirects: 0 as a redirect guard and runs in an environment where the fetch adapter is active: Deno, Bun, Cloudflare Workers, or Node.js with adapter: 'fetch' set explicitly.

References

  • github.com/advisories/GHSA-r4gj-5m52-g5wh
  • github.com/axios/axios/commit/d19040bda7a8be2f82c3c6e1a5bc03917daee39a
  • github.com/axios/axios/pull/11141
  • github.com/axios/axios/releases/tag/v1.20.0
  • github.com/axios/axios/security/advisories/GHSA-r4gj-5m52-g5wh
  • nvd.nist.gov/vuln/detail/CVE-2026-101907

Code Behaviors & Features

Detect and mitigate CVE-2026-101907 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.17.0 before 1.20.0

Fixed versions

  • 1.20.0

Solution

Upgrade to version 1.20.0 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-441: Unintended Proxy or Intermediary ('Confused Deputy')
  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

npm/axios/CVE-2026-101907.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 07 Oct 2026 12:17:32 +0000.