Executive brief
Axios is a popular library used by developers to make web requests. A vulnerability exists where certain request settings can be manipulated if the application environment has already been compromised by a "prototype pollution" attack. This could allow an attacker to silently steal login credentials or modify the data sent in web requests, potentially leading to unauthorized access or data tampering.
Technical details
Axios is vulnerable to prototype pollution gadgets within nested configuration objects like 'auth' and 'paramsSerializer'. While the top-level configuration is hardened with a null prototype, nested objects are cloned into ordinary JavaScript objects that inherit from Object.prototype. If an attacker has already achieved prototype pollution in the environment, they can inject properties like 'username', 'password', or 'serialize' into these nested objects. This allows for the silent injection of 'Authorization' headers or the hijacking of query string serialization. The issue is caused by a lack of own-property checks in 'lib/core/mergeConfig.js' and downstream consumers in 'lib/adapters/http.js' and 'lib/helpers/buildURL.js'. Patches are available in versions 0.33.0 and 1.18.0.
Affected products
- Axios axios >= 0.8.0, < 0.33.0; >= 1.0.0, < 1.18.0
Timeline
- 2026-07-06: disclosed
- 2026-07-20: advisory