🛡️ CVE-2026-42044 — axios

🟡 CVSS 6.5 — Medium ⚠️ Exploit Public CWE-1321 OSV
6.5
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Axios: Invisible JSON Response Tampering via Prototype Pollution Gadget in parseReviver

# Vulnerability Disclosure: Invisible JSON Response Tampering via Prototype Pollution Gadget in parseReviver

Summary

The Axios library is vulnerable to a Prototype Pollution "Gadget" attack that allows any Object.prototype pollution in the application's dependency tree to be escalated into surgical, invisible modification of all JSON API responses — including privilege escalation, balance manipulation, and authorization bypass.

The default transformResponse function at lib/defaults/index.js:124 calls JSON.parse(data, this.parseReviver), where this is the merged config object. Because parseReviver is not present in Axios defaults, not validated by assertOptions, and not subject to any constraints, a polluted Object.prototype.parseReviver function is called for every key-value pair in every JSON response, allowing the attacker to selectively modify individual values while leaving the rest of the response intact.

This is strictly more powerful than the transformResponse gadget because:

1. No constraints — the reviver can return any value (no "must return true" requirement)

2. Selective modification — individual JSON keys can be changed while others remain untouched

3. Invisible — the response structure and most values look completely normal

4. Simultaneous exfiltration — the reviver sees the original values before modification

Severity: Critical (CVSS 9.1)

Affected Versions: All versions (v0.x - v1.x including v1.15.0)

Vulnerable Component: lib/defaults/index.js:124 (JSON.parse with prototype-inherited reviver)

CWE

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
  • CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes

CVSS 3.1

Score: 9.1 (Critical)

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

| Metric | Value | Justification |

|---|---|---|

| Attack Vector | Network | PP is triggered remotely via any vulnerable dependency |

| Attack Complexity | Low | Once PP exists, single property assignment. Consistent with GHSA-fvcv-3m26-pcqx scoring methodology |

| Privileges Required | None | No authentication needed |

| User Interaction | None | No user interaction required |

| Scope | Unchanged | Within the application process |

| Confidentiality | High | The reviver receives every key-value pair from every JSON response — full data exfiltration. In the PoC, apiKey: "sk-secret-internal-key" is captured |

| Integrity | High | Arbitrary, selective modification of any JSON value. No constraints. In the PoC, isAdmin: false → true, role: "viewer" → "admin", balance: 100 → 999999. The response looks completely normal except for the surgically altered values |

| Availability | None | No crash, no error — the attack is entirely silent |

Comparison with All Known Axios PP Gadgets

| Factor | GHSA-fvcv-3m26-pcqx (Header Injection) | transformResponse | proxy (MITM) | parseReviver (This) |

|---|---|---|---|---|

| PP target | Object.prototype['header'] | Object.prototype.transformResponse | Object.prototype.proxy | Object.prototype.parseReviver |

| Fixed by 1.15.0? | Yes | No | No | No |

| Constraints | N/A (fixed) | Must return true | None | None |

| Data modification | Header injection only | Response replaced with true | Full MITM | Selective per-key modification |

| Stealth | Request anomaly visible | Response becomes true (obvious) | Proxy visible in network | Completely invisible |

| Data access | Headers only | this.auth + raw response | All traffic | Every JSON key-value pair |

| Validated? | N/A | assertOptions validates | Not validated | Not validated |

| In defaults? | N/A | Yes → goes through mergeConfig | No → bypasses mergeConfig | No → bypasses mergeConfig |

Usage of "Helper" Vulnerabilities

This vulnerability requires Zero Direct User Input.

If an attacker can pollute Object.prototype via any other library in the stack (e.g., qs, minimist, lodash, body-parser), the polluted parseReviver function is automatically used by every Axios request that receives a JSON response. The developer's code is completely safe — no configuration errors needed.

Root Cause Analysis

The Attack Path

```

Object.prototype.parseReviver = function(key, value) { /* malicious */ }

mergeConfig(defaults, userConfig)

│ parseReviver NOT in defaults → NOT iterated by mergeConfig

│ parseReviver NOT in userConfig → NOT iterated by mergeConfig

│ Merged config has NO own parseReviver property

transformData.call(config, config.transformResponse, response)

│ Default transformResponse function runs (NOT overridden)

defaults/index.js:124:

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity high, availability none.

Weakness class

CVE-2026-42044 is classified as CWE-1321: Prototype Pollution. Attacker input can modify an object prototype, changing behaviour for objects across the application.

Affected software

CVE-2026-42044 is recorded against 1 package.

  • axios

Timeline and source

Published on 5 May 2026 and last revised on 10 August 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)

CVE-2026-42044 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity MEDIUM
CVSS Score 6.5
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
CWE CWE-1321
Public Exploit ⚠️ Yes
Source OSV
Published 2026-05-05
Updated 2026-08-12
Modified 2026-08-10
Fix URL N/A

Affected Packages

Software From version Fixed in
axios

Exploit Protection

Are you running axios?

CVE-2026-42044 carries CVSS 6.5 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-42044 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.