Axios CVE-2026-42035: Prototype Pollution Leads to Header Injection
The National Vulnerability Database has disclosed CVE-2026-42035, a high-severity prototype pollution vulnerability in Axios, a widely used HTTP client for browsers and Node.js. This flaw, present in versions prior to 1.15.1 and 0.31.1, specifically targets the HTTP adapter (lib/adapters/http.js) and allows attackers to inject arbitrary HTTP headers into outgoing requests. The vulnerability is rated 7.4 (HIGH) on the CVSS scale.
The attack vector leverages Axios’s duck-type checking of data payloads. An attacker can pollute Object.prototype with specific functions (getHeaders, append, pipe, on, once, Symbol.toStringTag), causing Axios to misinterpret a plain object as a FormData instance. This then triggers a call to an attacker-controlled getHeaders() function, merging malicious headers into the outgoing request. Critically, the prototype pollution source doesn’t need to originate from Axios itself; any vulnerable dependency in the application’s tree is sufficient to trigger this gadget.
This vulnerability highlights the insidious nature of prototype pollution, which often flies under the radar until it’s chained with other application logic. For defenders, this isn’t just about Axios; it’s a reminder that a single, seemingly minor prototype pollution primitive anywhere in a complex dependency graph can have significant downstream consequences. The National Vulnerability Database reports this issue is fixed in Axios versions 1.15.1 and 0.31.1.
What This Means For You
- If your organization uses Axios, immediately check your dependency tree for versions prior to 1.15.1 or 0.31.1. Prioritize patching to 1.15.1 or 0.31.1 to mitigate CVE-2026-42035. This vulnerability allows for arbitrary HTTP header injection, which attackers can leverage for session hijacking, bypassing security controls, or even initiating Server-Side Request Forgery (SSRF) attacks. Furthermore, audit your application's entire dependency graph for *any* prototype pollution primitives, as this Axios vulnerability can be triggered by pollution originating from other libraries.
Related ATT&CK Techniques
🛡️ Detection Rules
3 rules · 6 SIEM formats3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.
CVE-2026-42035: Axios Prototype Pollution to Header Injection
title: CVE-2026-42035: Axios Prototype Pollution to Header Injection
id: scw-2026-04-24-ai-1
status: experimental
level: critical
description: |
Detects potential exploitation of CVE-2026-42035 by looking for requests targeting Axios with a query parameter indicative of prototype pollution leading to header injection. This rule specifically targets the vulnerability in the Axios HTTP adapter where an attacker can inject arbitrary HTTP headers into outgoing requests by polluting the Object.prototype.
author: SCW Feed Engine (AI-generated)
date: 2026-04-24
references:
- https://shimiscyberworld.com/posts/nvd-CVE-2026-42035/
tags:
- attack.initial_access
- attack.t1190
logsource:
category: webserver
detection:
selection:
cs-uri|contains:
- '/axios/'
cs-uri-query|contains:
- 'polluted_prototype=getHeaders'
condition: selection
falsepositives:
- Legitimate administrative activity
Source: Shimi's Cyber World · License & reuse
Indicators of Compromise
| ID | Type | Indicator |
|---|---|---|
| CVE-2026-42035 | Code Injection | Axios < 1.15.1 |
| CVE-2026-42035 | Code Injection | Axios < 0.31.1 |
| CVE-2026-42035 | Code Injection | Vulnerable component: lib/adapters/http.js |
| CVE-2026-42035 | Code Injection | Prototype pollution gadget allowing arbitrary HTTP header injection |
Source & Attribution
| Source Platform | NVD |
| Channel | National Vulnerability Database |
| Published | April 24, 2026 at 21:16 UTC |
This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.
Believe this infringes your rights? Submit a takedown request.