Axios: maxRedirects: 0 is not enforced by the fetch adapter, allowing redirect-based SSRF
## Summary 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. ## Impact An attacker who controls the initial URL or a redirecting server can cause a fetch-adapter request to follow a redirect even though the caller configured `maxRedirects: 0`. If the redirect target is reachable only from the application environment, this can expose internal responses or trigger state-changing internal endpoints. This should not be described as unconditional SSRF. The bypass requires a redirect source, such as an attacker-controlled server or open redirect, and an application that trusted `maxRedirects: 0` as the redirect guard. ## Affected Functionality Affected: - `adapter: 'fetch'`. - Runtime environments where fetch is selected by adapter resolution. - Requests configured with `maxRedirects: 0` but without `fetchOptions.redirect: 'manual'` or equivalent runtime-specific redirect control. Not affected: - Node HTTP adapter, which enforces `maxRedirects: 0`. - Requests that do not follow redirects in the underlying fetch implementation because the caller explicitly configured fetch redirect
GHSA-r4gj-5m52-g5wh
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-r4gj-5m52-g5wh
axios
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.20.0
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.17.0"
},
{
"fixed": "1.20.0"
}
]
}
],
"package": {
"name": "axios",
"purl": "pkg:npm/axios",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-r4gj-5m52-g5wh/GHSA-r4gj-5m52-g5wh.json"
}
}
]- Related CVEs
- CVE-2026-101907
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #39283 · Revision 1
- Added to Heist Feed
- Publisher date