Skip to content
Prototype Pollution Vulnerability in Axios Request Interceptors

Prototype Pollution Vulnerability in Axios Request Interceptors

First seen 30 Sep 2026, 23:28 UTC • •

Article Content

Browse articles
ThreatCluster AI
ThreatCluster •October 1, 2026 at 00:01 UTC
  • •Axios request interceptors can be exploited for prototype pollution.
  • •Attackers can inject headers into requests if interceptors omit their own headers property.
  • •The vulnerability is conditional and does not affect all requests or interceptors.

A vulnerability in Axios request interceptors allows for prototype pollution, potentially enabling attackers to inject malicious headers into requests. If an interceptor returns a plain object without its own headers property, the dispatchRequest function may read from the inherited Object.prototype.headers. This issue arises when a prior prototype pollution primitive is present in the same process. The vulnerability affects Axios versions where interceptors can return a new ordinary object without headers. The problem is conditional, not affecting all interceptors or requests. Affected functionality includes request interceptor chains that return new ordinary objects and replacement config objects that lack an own headers property. The issue was verified locally on Axios version 1.18.1. Users are advised to ensure interceptors set their own headers property to mitigate this risk.

Start a free Starter trial for enhanced analysis

Ask AI about this cluster

Updated just now How this analysis works

Timeline

2026-09-30
Vulnerability disclosed
Axios reported a prototype pollution vulnerability affecting request interceptors, allowing header injection.
github.com

More articles in this cluster (2)

Common questions

Which Axios versions are affected?
The vulnerability affects Axios versions where interceptors can return new ordinary objects without headers.
How can I mitigate this vulnerability?
Ensure that interceptors always set their own headers property to avoid the risk of prototype pollution.
Is there a patch available?
The articles do not mention a specific patch, but users should update to the latest version and follow best practices for interceptor usage.