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

CVE-2026-42041: Axios: Authentication Bypass via Prototype Pollution Gadget in `validateStatus` Merge Strategy

May 5, 2026

The Axios library is vulnerable to a Prototype Pollution “Gadget” attack that allows any Object.prototype pollution to silently suppress all HTTP error responses (401, 403, 500, etc.), causing them to be treated as successful responses. This completely bypasses application-level authentication and error handling.

The root cause is that validateStatus is the only config property using the mergeDirectKeys merge strategy, which uses JavaScript’s in operator — an operator that inherently traverses the prototype chain. When Object.prototype.validateStatus is polluted with () => true, all HTTP status codes are accepted as success.

Severity: High (CVSS 8.2) Affected Versions: All versions (v0.x - v1.x including v1.15.0) Vulnerable Component: lib/core/mergeConfig.js (mergeDirectKeys strategy) + lib/core/settle.js

References

  • github.com/advisories/GHSA-w9j2-pvgh-6h63
  • github.com/axios/axios
  • github.com/axios/axios/security/advisories/GHSA-w9j2-pvgh-6h63
  • nvd.nist.gov/vuln/detail/CVE-2026-42041

Code Behaviors & Features

Detect and mitigate CVE-2026-42041 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 before 0.31.1, all versions starting from 1.0.0 before 1.15.1

Fixed versions

  • 1.15.1
  • 0.31.1

Solution

Upgrade to versions 0.31.1, 1.15.1 or above.

Impact 4.8 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
  • CWE-287: Improper Authentication

Source file

npm/axios/CVE-2026-42041.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 09 May 2026 00:19:32 +0000.