Skip to content
Heist/ feed
Back to feed
High

Axios: Header Injection via Prototype Pollution

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-42035
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 17:10 UTC · Revision 1

Source evidence

Axios: Header Injection via Prototype Pollution

core-osv · Original source

Published 24 Apr 2026, 17:38 UTC

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.

osv:CVE-2026-42035
Complete source record
{
  "id": "30eead18afa57545c7c2d219ef542e3d91b6a27a649a7e13a54524efa6f7ff55",
  "url": "https://osv.dev/vulnerability/CVE-2026-42035",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Axios: Header Injection via Prototype Pollution",
    "summary": "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.",
    "evidence": "osv:CVE-2026-42035",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-42035",
      "aliases": [
        "CVE-2026-42035",
        "GHSA-6chq-wfr3-2hj9"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/axios/axios",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "a589dc525af12e0fabef7d6e5be028ad433eee31"
                },
                {
                  "introduced": "484aa4fe6addccbd32206a31eb3d2d000843066e"
                },
                {
                  "fixed": "ac42446be51300fe214ba3c6e40cc95f34fd6871"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.31.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:axios:axios:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "1.0.0"
                      },
                      {
                        "fixed": "1.15.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.31.0",
            "v1.15.0",
            "v1.14.0",
            "v1.13.6",
            "v0.30.3",
            "v0.30.2",
            "v1.13.5",
            "v1.13.4",
            "v1.13.3",
            "v1.13.2",
            "v1.13.1",
            "v1.13.0",
            "v0.30.1",
            "v1.12.2",
            "v1.12.1",
            "v1.12.0",
            "v0.30.0",
            "v1.11.0",
            "v1.10.0",
            "v1.9.0",
            "v1.8.4",
            "v1.8.3",
            "v1.8.2",
            "v1.8.1",
            "v1.8.0",
            "v0.29.0",
            "v1.7.9",
            "v1.7.8",
            "v1.7.7",
            "v1.7.6",
            "v1.7.5",
            "v1.7.4",
            "v1.7.3",
            "v1.7.2",
            "v0.28.1",
            "v1.7.1",
            "v1.7.0",
            "v1.7.0-beta.2",
            "v1.7.0-beta.1",
            "v1.7.0-beta.0",
            "v1.6.8",
            "v1.6.7",
            "v0.28.0",
            "v1.6.6",
            "v1.6.5",
            "v1.6.4",
            "v1.6.3",
            "v1.6.2",
            "v1.6.1",
            "v1.6.0",
            "v1.5.1",
            "v1.5.0",
            "v1.4.0",
            "v1.3.6",
            "v1.3.5",
            "v1.3.4",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.6",
            "v1.2.5",
            "v1.2.4",
            "v1.2.3",
            "v1.2.2",
            "1.2.2",
            "v1.2.1",
            "v1.2.0",
            "1.2.0-alpha.1",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.0",
            "v0.27.2",
            "v0.27.1",
            "v0.27.0",
            "v0.26.0",
            "v0.26.1",
            "v0.25.0",
            "v0.24.0",
            "v0.23.0",
            "0.21.3",
            "v0.21.2",
            "v0.21.0",
            "v0.20.0",
            "v0.20.0-0",
            "v0.19.2",
            "0.19.1",
            "v0.19.1",
            "v0.19.0",
            "v0.18.0",
            "v0.19.0-beta.1",
            "v0.17.1",
            "v0.17.0",
            "v0.16.2",
            "v0.16.1",
            "v0.16.0",
            "v0.15.3",
            "v0.15.2",
            "v0.15.1",
            "v0.15.0",
            "v0.14.0",
            "v0.13.1",
            "v0.13.0",
            "v0.12.0",
            "v0.11.1",
            "v0.11.0",
            "v0.10.0",
            "v0.9.1",
            "v0.9.0",
            "v0.8.1",
            "v0.8.0",
            "v0.7.0",
            "v0.6.0",
            "v0.5.4",
            "v0.5.3",
            "v0.5.2",
            "v0.5.1",
            "v0.5.0",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.1",
            "v0.3.0",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-42035.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.676807566Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42035.json",
        "https://github.com/axios/axios/security/advisories/GHSA-6chq-wfr3-2hj9",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-42035"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-113",
          "CWE-1321"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42035.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-42035",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487565,
  "published_at": "2026-04-24T17:38:07.752+00:00"
}