Skip to main content
Vulnerability Database/CVE-2026-101908

CVE-2026-101908: Axios HTTP Client Auth Bypass Vulnerability

CVE-2026-101908 is an authentication bypass flaw in Axios HTTP client allowing attackers to override request headers through prototype pollution. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-101908 Overview

Axios is a promise-based HTTP client used in browsers and Node.js applications. CVE-2026-101908 affects the library's fetch adapter in versions 1.7.0 through 1.19.x. The adapter constructs a Request object using sanitized resolvedOptions, but then invokes fetch with the original fetchOptions. When a separate same-process prototype-pollution flaw populates Object.prototype.headers, fetchOptions.headers resolves through inheritance. The inherited headers override the sanitized Request headers passed as the second argument to fetch. Attackers can then inject headers affecting authorization, caching, cloud metadata-service access, or application-specific behavior. The issue is fixed in Axios 1.20.0 and is classified under [CWE-1321] Improperly Controlled Modification of Object Prototype Attributes.

Critical Impact

Attacker-controlled request headers can bypass authorization checks, poison caches, and reach cloud instance metadata endpoints when combined with an existing prototype pollution primitive.

Affected Products

  • Axios versions 1.7.0 through 1.19.x (Node.js and browser fetch adapter)
  • Applications using the Axios fetch adapter with untrusted input reaching object merges
  • Downstream packages bundling vulnerable Axios versions as a transitive dependency

Discovery Timeline

  • 2026-09-28 - CVE-2026-101908 published to NVD
  • 2026-09-30 - Last updated in NVD database
  • Axios 1.20.0 - Fixed release published by the Axios maintainers

Technical Details for CVE-2026-101908

Vulnerability Analysis

The flaw lives in the fetch adapter's option handling path. Axios computes a resolvedOptions object that strips or sanitizes dangerous properties, then constructs a Request from it. Immediately afterward, fetch(request, fetchOptions) is called with the pre-sanitization fetchOptions object as the second argument. Per the WHATWG fetch specification, the second argument overrides properties on the Request object. Because fetchOptions.headers is looked up through the prototype chain, any value planted on Object.prototype.headers becomes the effective request headers. The sanitized headers on the Request object are silently discarded.

Root Cause

The root cause is the reuse of an un-sanitized options object after sanitization was already applied to a copy. Property access on fetchOptions.headers does not distinguish between own properties and inherited properties, so a polluted prototype supplies attacker-controlled values. The behavior maps directly to [CWE-1321] and depends on a companion prototype-pollution primitive in the same Node.js process.

Attack Vector

Exploitation is network-adjacent from Axios' perspective but requires a same-process prototype-pollution sink. An attacker who can pollute Object.prototype — for example through an unsafe recursive merge of JSON input — sets Object.prototype.headers to a chosen header map. Subsequent Axios fetch calls inherit those headers, allowing the attacker to add an Authorization token, force Cache-Control values, or set Metadata-Flavor: Google and X-aws-ec2-metadata-token headers to reach cloud instance metadata services.

javascript
// Security patch in lib/adapters/fetch.js — hardens runtime option handling (#11141)
const DEFAULT_CHUNK_SIZE = 64 * 1024;

const DEFAULT_REQUEST_OPTIONS = {
  cache: 'default',
  redirect: 'follow',
  referrer: 'about:client',
  referrerPolicy: '',
  mode: 'cors',
  integrity: '',
  keepalive: false,
  priority: 'auto',
  window: null,
};

const { isFunction } = utils;
// Source: https://github.com/axios/axios/commit/d19040bda7a8be2f82c3c6e1a5bc03917daee39a

The patch also introduces utils.getSafeProp in lib/core/Axios.js to read configuration values without traversing the prototype chain, preventing inherited method and header entries from influencing request construction.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-101908

Indicators of Compromise

  • Outbound HTTP requests from Node.js services to cloud metadata endpoints such as 169.254.169.254 when the application has no legitimate reason to query them.
  • Unexpected Authorization, Cookie, or Metadata-Flavor headers appearing on outbound requests from services using Axios.
  • Application logs showing successful requests to internal admin endpoints originating from user-facing handlers.

Detection Strategies

  • Inventory Node.js applications and identify direct or transitive dependencies on Axios versions between 1.7.0 and 1.19.x using npm ls axios or an equivalent SBOM query.
  • Instrument outbound HTTP traffic and alert on requests to cloud metadata IPs from workloads that do not require them.
  • Add runtime assertions that check for unexpected properties on Object.prototype at startup and after handling untrusted input.

Monitoring Recommendations

  • Forward web application and egress proxy logs to a centralized analytics platform and hunt for anomalous header combinations on outbound Axios traffic.
  • Enable Node.js process monitoring to track child processes and unexpected credential retrieval from IMDS endpoints.
  • Correlate dependency inventory data with build pipeline output to catch reintroduction of vulnerable Axios versions.

How to Mitigate CVE-2026-101908

Immediate Actions Required

  • Upgrade all Axios installations to version 1.20.0 or later across production, staging, and build systems.
  • Audit application code for unsafe recursive merges, Object.assign on untrusted input, and other prototype-pollution sinks.
  • Rotate any credentials or tokens that could have been exposed through metadata-service access or header injection.

Patch Information

The fix is available in Axios Release v1.20.0. Technical details are documented in GitHub Security Advisory GHSA-vh66-26gq-q6x8 and implemented in GitHub Pull Request #11141 with the corresponding GitHub Commit for Axios. The patch introduces default request options and prototype-safe property lookups.

Workarounds

  • Freeze Object.prototype at process start using Object.freeze(Object.prototype) to block the pollution primitive that this issue depends on.
  • Replace the Axios fetch adapter with the XHR or HTTP adapter until upgrade is possible, if application requirements allow.
  • Validate and reject request payloads containing __proto__, constructor, or prototype keys before passing them into merge utilities.
bash
# Upgrade Axios to the patched release
npm install axios@^1.20.0

# Verify no vulnerable versions remain in the dependency tree
npm ls axios

# Audit the project for known advisories
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.