# CVE-2026-42041: Axios Prototype Pollution authentication bypass in validateStatus

Source: https://junglewise.ai/threats/cve-2026-42041-axios-prototype-pollution-authentication-bypass-in-validatestatus  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-24. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-42041 · Severity: medium · CVSS 4.8 · Published 2026-04-24

Axios, a widely used tool for making web requests in JavaScript applications, contains a vulnerability that can allow attackers to bypass security checks. By exploiting a flaw in how the library handles internal settings, an attacker can force the application to treat failed login attempts or server errors as successful actions. This could lead to unauthorized access to sensitive data or cause the application to process incorrect information as if it were valid.

Technologies: [Axios](https://junglewise.ai/threats/technologies/axios), [axios (npm)](https://junglewise.ai/threats/technologies/npm-axios). Vendors: [Axios](https://junglewise.ai/threats/vendors/axios), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-42041 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-42041 being exploited in the wild.

**How severe is CVE-2026-42041?** Medium severity, with a CVSS score of 4.8, published 24 April 2026.

**Which products and versions are affected?** Axios <= 1.15.0, <= 0.31.0; axios (npm) SEMVER:introduced=1.0.0,fixed=1.15.1.

**Is there a fix for CVE-2026-42041?** Yes. axios (npm): upgrade to 1.15.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-42041 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-42041?** Check whether you run Axios or axios (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- axios (npm): upgrade to 1.15.1 or later

  ```sh
  npm install axios@1.15.1
  ```


## Technical details

Axios is vulnerable to a Prototype Pollution 'Gadget' attack within the `mergeDirectKeys` strategy used for the `validateStatus` configuration property. The root cause is the use of the JavaScript `in` operator, which traverses the prototype chain during configuration merging. If an attacker can pollute `Object.prototype.validateStatus` (e.g., via a separate vulnerability in another library), Axios will inherit this polluted property. This allows an attacker to force `validateStatus` to always return `true`, causing Axios to resolve all HTTP responses (including 401 Unauthorized, 403 Forbidden, and 500 Internal Server Error) as successful promises, effectively bypassing application-level security controls. The issue is fixed in versions 1.15.1 and 0.31.1 by replacing the `in` operator with `hasOwnProperty`.

## Affected products

- axios axios <= 1.15.0, <= 0.31.0

## Identifiers

- CVE-2026-42041
- GHSA-w9j2-pvgh-6h63

## Timeline

- 2026-04-15: disclosed: Vulnerability discovered and PoC developed
- 2026-04-24: advisory: GitHub Advisory published
- 2026-04-24: patched: Fixed in versions 1.15.1 and 0.31.1

## References

- [https://github.com/axios/axios/security/advisories/GHSA-w9j2-pvgh-6h63](https://github.com/axios/axios/security/advisories/GHSA-w9j2-pvgh-6h63)
- [https://access.redhat.com/errata/RHSA-2026:14937](https://access.redhat.com/errata/RHSA-2026:14937)
- [https://access.redhat.com/errata/RHSA-2026:16476](https://access.redhat.com/errata/RHSA-2026:16476)
- [https://access.redhat.com/errata/RHSA-2026:16532](https://access.redhat.com/errata/RHSA-2026:16532)
- [https://access.redhat.com/errata/RHSA-2026:16534](https://access.redhat.com/errata/RHSA-2026:16534)
- [https://access.redhat.com/errata/RHSA-2026:16535](https://access.redhat.com/errata/RHSA-2026:16535)
- [https://access.redhat.com/errata/RHSA-2026:16542](https://access.redhat.com/errata/RHSA-2026:16542)

## Related threats

- [Axios NO_PROXY CIDR notation bypass in Node.js adapter](https://junglewise.ai/threats/cve-2026-101899-axios-cidr-form-no-proxy-entries-are-ignored-causing-proxy)
- [Axios prototype pollution in ToFormData](https://junglewise.ai/threats/cve-2026-101909-axios-is-a-promise-based-http-client-for-the-browser-and-node-js)
- [Axios fetch adapter header injection via prototype pollution](https://junglewise.ai/threats/cve-2026-101908-axios-is-a-promise-based-http-client-for-the-browser-and-node-js)
- [Axios fetch adapter maxRedirects bypass](https://junglewise.ai/threats/cve-2026-101907-axios-is-a-promise-based-http-client-for-the-browser-and-node-js)
- [Axios ReDoS in shouldBypassProxy regular expression](https://junglewise.ai/threats/cve-2026-101906-axios-is-a-promise-based-http-client-for-the-browser-and-node-js)
