CVE-2026-42041: Axios: Authentication Bypass via Prototype Pollution Gadget in `validateStatus` Merge Strategy
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.
Security readout for executives and security teams
Plain-English summary
Axios versions before 1.15.1 and 0.31.1 can misread failed HTTP responses as successful if JavaScript Object.prototype has been polluted. In affected applications, this can bypass application-level authentication and error handling decisions. Treat this as high priority for internet-facing services, admin portals, and systems relying on Axios response failures for access control.
Executive priority
Prioritize remediation in the next standard security release cycle, faster for public-facing or access-control-sensitive systems. The issue has a high CVSS score and can undermine authentication logic, but the supplied sources do not confirm active exploitation.
Technical view
The issue is a prototype pollution gadget in Axios config merging. validateStatus uses the mergeDirectKeys strategy and JavaScript's in operator, which checks the prototype chain. If Object.prototype.validateStatus is polluted to always accept statuses, Axios treats 401, 403, 500, and similar responses as success. Fixed versions are 1.15.1 and 0.31.1.
Likely exposure
Exposure applies to applications or bundled products using axios >=1.0.0 and <1.15.1, or versions below 0.31.1. Risk is higher where another flaw, unsafe merge, or untrusted input can pollute Object.prototype and where Axios errors drive authentication, authorization, or business logic.
Exploitation context
The advisory describes a condition that can bypass application-level authentication and error handling, but the provided sources do not show active exploitation. The CVE is not listed as KEV in the supplied bundle. Practical exploitation depends on achieving Object.prototype pollution in the same JavaScript runtime.
Researcher notes
Key dependency is not merely Axios presence; assess whether Object.prototype pollution is possible in the runtime. Focus review on unsafe deep merge, query/body parsing, and object assignment patterns. Validate that Axios failure paths still fail closed after upgrade. Avoid assuming all Axios consumers are exploitable without a pollution source.
Mitigation direction
Upgrade axios to 1.15.1 or 0.31.1, as applicable.
If using Red Hat packages, review the listed Red Hat advisories.
Inventory bundled or transitive axios copies in applications and containers.
Reduce prototype pollution risk by hardening unsafe object merge and parsing paths.
Check vendor guidance for affected downstream products before applying workarounds.
Validation and detection
Review SBOMs and lockfiles for affected axios version ranges.
Confirm deployed artifacts include axios 1.15.1, 0.31.1, or later fixed versions.
Identify code paths where Axios error responses control authentication or authorization.
Review application tests for handling of 401, 403, and 500 responses.
Check Red Hat CVE and errata status for managed platforms.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1321: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Authentication and credential weaknesses can make valid-account abuse and credential telemetry useful review starting points. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1321 · source CWE mapping
Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Authentication represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improperly Controlled Modification of Dynamically-Determined Object Attributes
Improperly Controlled Modification of Dynamically-Determined Object Attributes represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.