All vulnerabilities

npm

CVE-2026-101904

Axios: Header Injection via Inherited headers After Minimal Interceptor

Severity
Medium
Published
30 Sept 2026
Last changed
30 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.20.0
Exploit chance
0.5% in the next 30 daysHigher than 42% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Prototype pollution (CWE-1321)Injection (CWE-74)
Also known as
GHSA-j8rh-479h-cp32
Sources
OSV.dev and GitHub

Description

Axios request interceptors may return a replacement config object. If an interceptor returns a plain object without an own headers property, dispatchRequest() later evaluates config.headers and can resolve an inherited Object.prototype.headers value. In a process where another vulnerability has polluted Object.prototype.headers, axios can send attacker-controlled headers.

Axios does not create the prototype pollution source, and the interceptor itself is trusted caller code. The vulnerable behavior is the post-interceptor axios config read that reopens a prototype-pollution gadget after earlier null-prototype config hardening.

An attacker with a prior same-process prototype-pollution primitive can inject headers into affected axios requests when the application uses an interceptor that rebuilds config and omits headers.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

Interceptors that rebuild config should always set an own headers property, for example by preserving config.headers or setting headers: {}. Mutating and returning the existing merged config also avoids replacing the null-prototype object.

Original report

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
axiosnpm · osv:npm:axios
  • From 1.0.0 before 1.20.0

About axios

Weekly downloads (npm)
143,624,637npm, 16 Nov 2026

References