CVE-2026-42033 Overview
A high-severity prototype pollution vulnerability has been identified in Axios, a widely-used promise-based HTTP client for browsers and Node.js. Prior to versions 1.15.1 and 0.31.1, when Object.prototype has been polluted by any co-dependency with keys that Axios reads without a hasOwnProperty guard, an attacker can silently intercept and modify every JSON response before the application processes it, or fully hijack the underlying HTTP transport. This hijacking grants access to request credentials, headers, and body content.
Critical Impact
Attackers exploiting this vulnerability can intercept all HTTP communications, steal credentials, modify API responses, and compromise application data integrity when prototype pollution exists in the same process.
Affected Products
- Axios versions prior to 1.15.1
- Axios versions prior to 0.31.1
- Node.js applications using vulnerable Axios versions
Discovery Timeline
- 2026-04-24 - CVE-2026-42033 published to NVD
- 2026-04-27 - Last updated in NVD database
Technical Details for CVE-2026-42033
Vulnerability Analysis
This vulnerability is classified as CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes), commonly known as Prototype Pollution. The flaw exists in how Axios reads properties from objects without proper hasOwnProperty guards. When a co-dependency or other code in the same Node.js process pollutes Object.prototype with specific keys that Axios checks during request/response processing, the attacker-controlled values are inadvertently used by Axios.
The precondition for exploitation requires prototype pollution from a separate source within the same process. While this creates a dependency on another vulnerability existing in the application, prototype pollution vulnerabilities are common in JavaScript ecosystems, making this a realistic attack scenario. Once the precondition is met, the impact is severe—allowing complete interception and modification of HTTP communications.
Root Cause
The root cause stems from Axios accessing object properties without verifying whether those properties belong to the object instance itself or were inherited from the prototype chain. JavaScript's prototype inheritance model means that any property set on Object.prototype becomes accessible on all objects. When Axios reads configuration or response data without hasOwnProperty checks, polluted prototype properties are interpreted as legitimate values.
This design flaw allows attackers who have achieved prototype pollution through another vector to inject malicious transformers, adapters, or configuration values that Axios will use during HTTP operations.
Attack Vector
The attack requires network access and exploits the lack of prototype property guards in Axios. An attacker must first achieve prototype pollution in the target application's JavaScript runtime, typically through a vulnerable dependency that processes untrusted input (such as deep merge utilities, query string parsers, or JSON parsers). Once prototype pollution is established, the attacker can:
- Intercept JSON Responses: Inject a malicious transformResponse function via prototype pollution to capture and modify all JSON responses before the application processes them
- Hijack HTTP Transport: Override the HTTP adapter to route requests through attacker-controlled infrastructure, exposing credentials, authentication tokens, and request bodies
The attack is particularly dangerous because it operates silently—applications continue to function normally while all HTTP communications are compromised. For detailed technical information, see the GitHub Security Advisory.
Detection Methods for CVE-2026-42033
Indicators of Compromise
- Unexpected modifications to API response data that differ from server-sent values
- Network traffic being routed to unexpected destinations or through unknown proxies
- Authentication tokens or credentials appearing in unexpected log files or network captures
- Anomalous behavior in HTTP client configurations not matching application code
Detection Strategies
- Implement Software Composition Analysis (SCA) to identify Axios versions prior to 1.15.1 or 0.31.1 in your dependency tree
- Monitor for prototype pollution attempts by auditing dependencies that perform deep object merging or property assignment
- Review application logs for unexpected HTTP adapter changes or transformer modifications
- Use runtime integrity monitoring to detect modifications to Object.prototype
Monitoring Recommendations
- Enable detailed HTTP client logging to capture request/response metadata for forensic analysis
- Implement Content Security Policy (CSP) and Subresource Integrity (SRI) for browser-based applications
- Monitor network egress for connections to unexpected endpoints that may indicate transport hijacking
- Deploy application performance monitoring (APM) to detect anomalous HTTP client behavior
How to Mitigate CVE-2026-42033
Immediate Actions Required
- Update Axios to version 1.15.1 or later for the 1.x branch immediately
- Update Axios to version 0.31.1 or later for the 0.x branch if using legacy versions
- Audit all application dependencies for known prototype pollution vulnerabilities
- Review and harden any code that processes untrusted input into object properties
Patch Information
The Axios maintainers have addressed this vulnerability by adding proper hasOwnProperty guards when reading object properties. The fix is available in versions 1.15.1 and 0.31.1. Organizations should prioritize upgrading to these patched versions. For complete patch details, refer to the GitHub Security Advisory.
Workarounds
- Freeze Object.prototype using Object.freeze(Object.prototype) at application startup to prevent prototype pollution (note: this may break some third-party libraries)
- Implement runtime monitoring for prototype pollution attempts before they can affect Axios
- Use object null-prototype patterns (Object.create(null)) for configuration objects passed to Axios
- Isolate Axios instances in separate V8 contexts or worker threads for critical applications
# Update Axios to patched version
npm update axios@1.15.1
# Or for yarn users
yarn upgrade axios@1.15.1
# Verify installed version
npm list axios
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


