Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. axios
  4. ›
  5. CVE-2026-42044

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

May 5, 2026

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)

References

  • github.com/advisories/GHSA-3w6x-2g7m-8v23
  • github.com/axios/axios
  • github.com/axios/axios/security/advisories/GHSA-3w6x-2g7m-8v23
  • nvd.nist.gov/vuln/detail/CVE-2026-42044

Code Behaviors & Features

Detect and mitigate CVE-2026-42044 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.0.0 before 1.15.2

Fixed versions

  • 1.15.2

Solution

Upgrade to version 1.15.2 or above.

Impact 6.5 MEDIUM

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

Learn more about CVSS

Weakness

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

Source file

npm/axios/CVE-2026-42044.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:18:47 +0000.