CVE-2026-42035

Axios: Header Injection via Prototype Pollution

Published Apr 24, 2026 CVSS 3.1 · 7.4 High EPSS < 1% KEV · Not listed
Description
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, a prototype pollution gadget exists in the Axios HTTP adapter (lib/adapters/http.js) that allows an attacker to inject arbitrary HTTP headers into outgoing requests. The vulnerability exploits duck-type checking of the data payload, where if Object.prototype is polluted with getHeaders, append, pipe, on, once, and Symbol.toStringTag, Axios misidentifies any plain object payload as a FormData instance and calls the attacker-controlled getHeaders() function, merging the returned headers into the outgoing request. The vulnerable code resides exclusively in lib/adapters/http.js. The prototype pollution source does not need to originate from Axios itself — any prototype pollution primitive in any dependency in the application's dependency tree is sufficient to trigger this gadget. This vulnerability is fixed in 1.15.1 and 0.31.1.

Analysis

AI-generated

Technical impact

Axios is a widely used HTTP client for browsers and Node.js. A prototype pollution flaw in the HTTP adapter can cause Axios to treat certain plain object payloads as FormData. When the polluted prototype contains getHeaders, append, pipe, on, once, and Symbol.toStringTag properties, the client invokes the attacker-controlled getHeaders() method and merges the returned headers into every outgoing request. This allows an attacker to insert arbitrary HTTP headers into requests that the application or a downstream server sends, potentially hijacking requests, redirecting traffic, or injecting malicious data.

Affected Systems

The vulnerability affects the Axios package, versions prior to 1.15.1 for browsers and 0.31.1 for Node.js environments. Any application that imports these affected versions and has a dependency that can pollute Object.prototype will be susceptible.

Risk and Exploitability

The CVSS score of 7.4 indicates moderate to high severity, yet the EPSS score of less than 1% suggests that exploitation is presently unlikely. The weakness is not listed in CISA’s KEV catalog, meaning the vulnerability has not yet been demonstrated in widespread attacks. Attackers would need to induce prototype pollution in their own application's dependency tree, then trigger the gadget within Axios to inject headers into outgoing traffic. Given the dependency-specific nature of prototype pollution, exploitation remains relatively complex and likely requires local or privilege escalation within the attacked environment.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Axios to at least version 1.15.1 for browsers or 0.31.1 for Node.js environments.
  • Audit the dependency tree for any modules that could pollute Object.prototype and remove or update them to versions that do not use unsafe prototype functions.
  • Implement application-level sanitization by freezing or cleaning Object.prototype before initializing Axios, ensuring that getHeaders and related prototype properties are not present.

Generated by OpenCVE AI on April 29, 2026 at 02:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6chq-wfr3-2hj9 Axios: Header Injection via Prototype Pollution
History
Type Values Removed Values Added
First Time appeared Axios
Axios axios
CPEs cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*
Vendors & Products Axios
Axios axios
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, a prototype pollution gadget exists in the Axios HTTP adapter (lib/adapters/http.js) that allows an attacker to inject arbitrary HTTP headers into outgoing requests. The vulnerability exploits duck-type checking of the data payload, where if Object.prototype is polluted with getHeaders, append, pipe, on, once, and Symbol.toStringTag, Axios misidentifies any plain object payload as a FormData instance and calls the attacker-controlled getHeaders() function, merging the returned headers into the outgoing request. The vulnerable code resides exclusively in lib/adapters/http.js. The prototype pollution source does not need to originate from Axios itself — any prototype pollution primitive in any dependency in the application's dependency tree is sufficient to trigger this gadget. This vulnerability is fixed in 1.15.1 and 0.31.1.
Title Axios: Header Injection via Prototype Pollution
Weaknesses CWE-113
CWE-1321
References
Metrics cvssV3_1

{'score': 7.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Weaknesses
  • CWE-113

    Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')

  • CWE-1321

    Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

  • CWE-915

    Improperly Controlled Modification of Dynamically-Determined Object Attributes

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 25, 2026, 3:55 AM
Reserved
Apr 23, 2026, 4:05 PM
Status
Analyzed
Published
Apr 24, 2026, 6:16 PM
Modified
Nov 11, 2026, 11:10 PM
Severity
Moderate
Public date
Apr 24, 2026, 5:38 PM