Executive brief
Axios is an HTTP client library used by millions of JavaScript applications to make API requests. If an attacker can pollute JavaScript's global Object.prototype (via a separate vulnerability or malicious dependency), they can hijack axios requests to send unexpected request bodies, route traffic through attacker-controlled proxies to steal credentials, or inject malicious URL parameters. This could lead to credential theft, data exfiltration, or request tampering in applications that depend on axios for secure communications.
Technical details
The vulnerability is a prototype-pollution read-side gadget (CWE-1321) in axios's request construction. The primary attack vector affects bodyless HTTP methods: the code at lib/core/Axios.js line 248 uses (config || {}).data before config normalization, causing inherited polluted properties to become owned properties in the request config. Three distinct gadgets exist: (1) inherited config.proxy routes requests through attacker-controlled proxies, exposing headers and URLs; (2) inherited config.data on GET/DELETE/HEAD/OPTIONS sends attacker-controlled request bodies; (3) inherited config.paramsSerializer is invoked with request parameters, allowing arbitrary URL serialization. Attack requires prior Object.prototype pollution from a separate vulnerability or dependency. High-level axios.get() calls on 1.15.2+ are partially mitigated by mergeConfig() returning null-prototype configs, but low-level direct calls to adapters/helpers (e.g., lib/adapters/http.js, unsafe/helpers/resolveConfig.js) remain vulnerable. Fixed in axios 1.18.0 and 0.33.0.
Affected products
- npm axios >=1.0.0 <1.18.0, >=0 <0.33.0
Timeline
- 2026-07-06: disclosed: Original advisory GHSA-mmx7-hfxf-jppx published
- 2026-08-01: disclosed: Duplicate advisory GHSA-f2r5-pqh9-r8f8 published; CVE-2026-67316 assigned
- 2026-08-01: patched: Fixes available in axios 1.18.0 and 0.33.0
- 2026-08-31: advisory: Duplicate advisory GHSA-f2r5-pqh9-r8f8 withdrawn