CVE-2026-42041

Axios: Authentication Bypass via Prototype Pollution Gadget in `validateStatus` Merge Strategy

MEDIUM 4.8

At a glance

Source
NVD
EPSS
EPSS 0.66 % · percentile 51 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Modified

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.

Weaknesses (CWE)

  • CWE-287 — Improper Authentication
  • CWE-1321 — Improperly Controlled Modification of Object Prototype Attributes
  • CWE-915 — Improperly Controlled Modification of Dynamically-Determined Object Attributes

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 4.8CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NGitHub_M
CVSS 3.1HIGH 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:Nredhat-SADP
CVSS 3.1MEDIUM 4.8CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NNVD · security-advisories@github.com (Secondary)
CVSS 3.1MEDIUM 6.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:NNVD · nvd@nist.gov (Primary)
CVSS 3.1HIGH 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:NNVD · 0b0ca135-0b70-47e7-9f44-1890c2a1c46c (Secondary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
axios · axiosaffected >= 1.0.0, < 1.15.1 ; affected < 0.31.1

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD