Axios 1.21.0 fixes credential leak and three Node.js flaws
Original title: Multiple Axios Vulnerabilities Could Let Hackers Steal Credentials and Crash Node.js Applications
Redirects can forward Authorization or Cookie headers to another operator’s subdomain; 0.35.0 fixes two 0.x issues.
Axios maintainers fixed four high-severity flaws in the JavaScript HTTP client. A Node.js HTTP-adapter bug can send caller-supplied Authorization or Cookie headers when a trusted server redirects to a subdomain another party operates. Three other bugs can crash cleanup, stall the event loop, or exhaust memory before a request is sent. Axios 1.21.0 fixes all four; 0.35.0 fixes the redirect and serialization flaws on the 0.x branch.
Unconfirmed: The fetch-adapter advisory does not establish that Axios alone allows arbitrary code execution.
- The redirect must keep the effective port and must not downgrade HTTPS to HTTP.
- The fetch-adapter crash affects 1.7.6 through 1.20.0 and needs prototype pollution.
- A configured transfer rate below two bytes per second can stall unrelated requests.
- The serializer can allocate a huge array from a small object’s declared length.
- On 0.x, listed ranges start at 0.25.0 for redirects and 0.27.0 for serialization.
Impact: Credential leak on redirects, or crash, stall, or memory exhaustion
| Product | Affected | Fixed in |
|---|---|---|
| Axios | 1.7.6 through 1.20.0 for the fetch-adapter crash; 0.x redirect from 0.25.0; serialization from 0.27.0 | 1.21.0; 0.35.0 for redirect and serialization on 0.x |
- 1.Upgrade to Axios 1.21.0, or 0.35.0 on the 0.x branch.
- 2.Disable automatic redirects on authenticated requests until upgraded.
- 3.Set every nonzero transfer rate to at least two bytes per second.
From the original article
3 min read at gbhackers.com
Axios maintainers have fixed four high-severity vulnerabilities in the JavaScript HTTP client. One of these vulnerabilities could expose bearer tokens or session cookies if a trusted server redirects a request. The other three vulnerabilities can disrupt a Node.
By Divya · gbhackers.com
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.