Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. axios
  4. ›
  5. GHSA-7q8q-rj6j-mhjq

GHSA-7q8q-rj6j-mhjq: Axios: Nested axios option objects can consume polluted prototype values

July 20, 2026

Axios can consume inherited properties from nested request option objects when the JavaScript process already has a polluted Object.prototype.

The top-level merged config is protected with a null prototype, but nested plain objects such as auth and paramsSerializer are cloned into ordinary objects. If application code passes placeholders such as auth: {} or paramsSerializer: {}, inherited username, password, encode, or serialize properties can influence outbound requests.

axios 1.16.1 mitigates prototype-pollution gadgets on the top-level request config but not on nested option objects. When a caller passes a partial nested option object such as auth: {} or paramsSerializer: {}, axios reads inner fields (username, password, encode, serialize) through the prototype chain. If Object.prototype has been polluted by another component in the same Node.js process, those inherited values are silently injected into the outbound request, including the Authorization header and the serialized query string.

References

  • github.com/advisories/GHSA-7q8q-rj6j-mhjq
  • github.com/axios/axios/commit/1417285c69344bbcc6420a021f67dee0c6fedb2d
  • github.com/axios/axios/commit/32fc489632377d214db55bfa4e2c48486a7d7ce2
  • github.com/axios/axios/pull/11000
  • github.com/axios/axios/pull/11001
  • github.com/axios/axios/releases/tag/v0.33.0
  • github.com/axios/axios/releases/tag/v1.18.0
  • github.com/axios/axios/security/advisories/GHSA-7q8q-rj6j-mhjq

Code Behaviors & Features

Detect and mitigate GHSA-7q8q-rj6j-mhjq with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.8.0 before 0.33.0, all versions starting from 1.0.0 before 1.18.0

Fixed versions

  • 0.33.0
  • 1.18.0

Solution

Upgrade to versions 0.33.0, 1.18.0 or above.

Impact 4 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/axios/GHSA-7q8q-rj6j-mhjq.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:34 +0000.