Axios nested option objects prototype pollution gadget

Severity: low · CVSS 3.7 · Published 2026-08-01

Axios, a popular HTTP client library for JavaScript, fails to sanitize nested configuration objects (like auth and paramsSerializer) against prototype pollution attacks. If another part of an application has already polluted the global Object.prototype, an attacker can inject malicious values that cause axios to silently add unauthorized HTTP headers or modify query strings in outbound requests.

Technologies: Axios. Vendors: Axios.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Low severity, with a CVSS score of 3.7, published 1 August 2026.
Which products and versions are affected?
Axios >=0.8.0, <0.33.0.
Is there a fix for This vulnerability?
A patch was published on 2026-08-01: Patches available in axios >=0.33.0 and >=1.18.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run Axios at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability is a prototype pollution gadget in axios's configuration merging logic (CWE-1321). The root cause is in lib/core/mergeConfig.js, which hardened the top-level config object with Object.create(null) but still clones nested objects using ordinary {} constructors, causing them to inherit from Object.prototype. Downstream code in lib/helpers/resolveConfig.js, lib/adapters/http.js, and lib/helpers/buildURL.js reads auth.username, auth.password, paramsSerializer.encode, and paramsSerializer.serialize without own-property checks. An attacker must first have a prototype pollution primitive in the application (from another vulnerable component), then pass empty nested objects like auth: {} or paramsSerializer: {} to axios methods. This causes inherited malicious values to be silently injected: Basic auth headers (string pollution), query-string serialization changes (function pollution), or request failures. The attack requires network reachability to axios and pre-existing prototype pollution elsewhere in the process; no user interaction or privileges are required. Patches are available in axios >=0.33.0 and >=1.18.0.

Affected products

  • axios axios >=0.8.0, <0.33.0
  • axios axios >=1.0.0, <1.18.0

Timeline

  • 2026-07-06: disclosed: Security advisory GHSA-7q8q-rj6j-mhjq published by axios
  • 2026-08-01: advisory: Duplicate advisory GHSA-9wx3-p993-35vp published to GitHub Advisory Database
  • 2026-08-01: patched: Patches available in axios >=0.33.0 and >=1.18.0
  • 2026-09-01: other: GHSA-9wx3-p993-35vp withdrawn as duplicate; refer to GHSA-7q8q-rj6j-mhjq

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.