Axios Security Flaws Could Leak Authentication Tokens and Crash Node.js Servers

cyberpress.org

The Axios maintainers have patched four high-severity flaws in the popular JavaScript HTTP client. One exposes bearer credentials through redirect handling. The other three cause process-level denial of service in Node.js.

All four advisories were published on November 28, 2026, and each carries a CVSS v4 score of 8.2 with no CVE assigned yet.

Axios Security Flaws

The credential exposure, GHSA-96×6-9jq2-jqcp, sits in the Node.js HTTP adapter. Axios delegates redirect handling to follow-redirects, which deliberately keeps Authorization and Cookie headers when a trusted host redirects to a strict subdomain.

A redirect from api.example.com to evil.api.example.com therefore delivers complete bearer tokens or session cookies to an attacker-observable destination.

This contradicts Axios’s documented cross-host credential-stripping guarantee. Releases from 0.25.0 up to 0.35.0, and from 1.0.0 up to 1.21.0, are affected.

Exploitation requires redirect following, a caller-supplied credential header, and an attacker-controlled subdomain. Multi-tenant platforms, dangling DNS records, and object storage that redirects into per-customer subdomains fit that profile.

The fetch and XHR adapters are unaffected. Teams can mitigate by setting maxRedirects to 0, listing authorization and cookie in sensitiveHeaders, or enforcing an exact-origin allowlist in beforeRedirect.

This follows the Axios npm package compromise from March 2026, which showed how heavily attackers target this library.

GHSA-6746-99mh-37fc is a prototype-pollution gadget in the fetch adapter’s signal cleanup, affecting versions 1.7.6 through 1.20.0. The composeSignals.js code probes signal.unsubscribe before removeEventListener.

If a separate primitive has polluted Object.prototype.unsubscribe, the inherited value is read from the prototype chain. A truthy non-callable value throws an uncaught asynchronous TypeError, which terminates the Node.js process.

A callable value is invoked with the AbortSignal as its receiver. The attack needs the fetch adapter and a real AbortSignal passed through config.signal.

GHSA-r7r7-378m-mqq3 is an event-loop starvation condition (CWE-835) in AxiosTransformStream, affecting versions 1.0.0 through 1.20.0. A positive maxRate below 2 B/s produces a fractional threshold of 0.5 in the bandwidth throttle.

Buffer.subarray() truncates that threshold to zero, so a 101-byte chunk is never consumed and is rescheduled through process.nextTick() indefinitely.

A hostile server can freeze timers, cancellation callbacks, and unrelated requests with one 101-byte response. Setting every nonzero rate to at least 2 B/s avoids the loop.

GHSA-hxh7-q3v4-r388 is an uncontrolled allocation (CWE-789) in the multipart serializer, affecting versions 0.27.0 through 0.35.0 and 1.0.0 through 1.21.0.

The default toFormData visitor passes any top-level key ending in [] to utils.toArray(), which trusts an arbitrary numeric length. A payload such as {length: 50000000} forces synchronous allocation of a huge array and heap exhaustion before adapter dispatch.

Timeouts, response limits, and maxDepth do not stop it. The same path runs through postForm, putForm, patchForm, and default query serialization via params from v0.28.0.

Maintainers fixed the redirect and serializer flaws in 0.35.0 and 1.21.0. The prototype-pollution and rate-limiting flaws are fixed in 1.21.0. Teams should upgrade, pin exact versions, and validate attacker-influenced object structure before it reaches Axios.

Pipeline owners should also review token handling, as in the recent Microsoft guidance on Axios mitigation and the SAP GitHub token theft incident.

Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team 

The post Axios Security Flaws Could Leak Authentication Tokens and Crash Node.js Servers appeared first on Cyber Security News.

Read at cyberpress.org ↗

Filed under vulnidentitysupply-chain

Mentions (2)
Reader notes

Notes are held for moderation. No account needed.