Axios: Prototype pollution auth subfields can inject Basic auth (CVE-2026-67314)
Axios versions from 1.15.2 up to but not including 1.18.0 contain a prototype pollution read-side vulnerability affecting Basic auth subfield handling. If an attacker can pollute Object.prototype with username or password properties and the host application makes an axios request with an auth object missing these own properties, axios will inherit and use the polluted values to construct the Authorization header. This can lead to outbound request tampering by injecting attacker-controlled Basic auth credentials or causing authorization failures. Exploitation requires a separate prototype pollution vulnerability in the host environment and specific axios usage patterns. The vulnerability does not directly leak credentials from axios itself. A fix is available for this issue.
AI Analysis
Technical Summary
Axios versions >=1.15.2 <1.18.0 have a prototype pollution read-side gadget in Basic auth subfield handling. When an axios request includes an auth object missing own username or password properties, axios reads these values from Object.prototype if polluted, causing attacker-controlled Basic auth headers to be sent. This occurs because nested auth subfields are accessed without own-property checks, allowing prototype chain reads. The vulnerability requires a separate prototype pollution primitive in the host application and specific axios usage patterns such as passing auth: opts.auth || {}. The impact is outbound request tampering, including injecting attacker-chosen Basic auth credentials or replacing existing Authorization headers. The vulnerability does not cause automatic credential exfiltration. The fix involves adding own-property checks when reading username and password fields, matching patterns used elsewhere in axios. Workarounds include avoiding empty or partial auth objects and filtering prototype pollution vectors in user input.
Potential Impact
An attacker able to pollute Object.prototype.username and/or Object.prototype.password can influence the Authorization: Basic header on axios requests that pass an empty or partial auth object. This allows injection of attacker-chosen Basic auth credentials or replacement of existing Authorization headers, potentially causing downstream authorization failures or request tampering. The vulnerability does not directly disclose secrets from axios, and credential disclosure requires additional application-specific conditions. There is no evidence of known exploits in the wild. The severity is moderate due to the requirement of a separate prototype pollution vulnerability and specific axios usage patterns.
Mitigation Recommendations
A fix is available for this vulnerability; users should upgrade axios to a version >=1.18.0 where the issue is patched. Until then, avoid passing empty or partial auth objects to axios requests. Applications should sanitize and filter untrusted input to prevent prototype pollution, especially filtering __proto__, constructor, and prototype properties. When merging user options, use own-property checks rather than fallback patterns like opts.auth || {}. Wrappers should use null-prototype objects or explicitly copy only own properties for auth objects. Check the official axios advisory or repository for the confirmed patched versions and upgrade guidance.
Axios: Prototype pollution auth subfields can inject Basic auth (CVE-2026-67314)
Description
Axios versions from 1.15.2 up to but not including 1.18.0 contain a prototype pollution read-side vulnerability affecting Basic auth subfield handling. If an attacker can pollute Object.prototype with username or password properties and the host application makes an axios request with an auth object missing these own properties, axios will inherit and use the polluted values to construct the Authorization header. This can lead to outbound request tampering by injecting attacker-controlled Basic auth credentials or causing authorization failures. Exploitation requires a separate prototype pollution vulnerability in the host environment and specific axios usage patterns. The vulnerability does not directly leak credentials from axios itself. A fix is available for this issue.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Axios versions >=1.15.2 <1.18.0 have a prototype pollution read-side gadget in Basic auth subfield handling. When an axios request includes an auth object missing own username or password properties, axios reads these values from Object.prototype if polluted, causing attacker-controlled Basic auth headers to be sent. This occurs because nested auth subfields are accessed without own-property checks, allowing prototype chain reads. The vulnerability requires a separate prototype pollution primitive in the host application and specific axios usage patterns such as passing auth: opts.auth || {}. The impact is outbound request tampering, including injecting attacker-chosen Basic auth credentials or replacing existing Authorization headers. The vulnerability does not cause automatic credential exfiltration. The fix involves adding own-property checks when reading username and password fields, matching patterns used elsewhere in axios. Workarounds include avoiding empty or partial auth objects and filtering prototype pollution vectors in user input.
Potential Impact
An attacker able to pollute Object.prototype.username and/or Object.prototype.password can influence the Authorization: Basic header on axios requests that pass an empty or partial auth object. This allows injection of attacker-chosen Basic auth credentials or replacement of existing Authorization headers, potentially causing downstream authorization failures or request tampering. The vulnerability does not directly disclose secrets from axios, and credential disclosure requires additional application-specific conditions. There is no evidence of known exploits in the wild. The severity is moderate due to the requirement of a separate prototype pollution vulnerability and specific axios usage patterns.
Mitigation Recommendations
A fix is available for this vulnerability; users should upgrade axios to a version >=1.18.0 where the issue is patched. Until then, avoid passing empty or partial auth objects to axios requests. Applications should sanitize and filter untrusted input to prevent prototype pollution, especially filtering __proto__, constructor, and prototype properties. When merging user options, use own-property checks rather than fallback patterns like opts.auth || {}. Wrappers should use null-prototype objects or explicitly copy only own properties for auth objects. Check the official axios advisory or repository for the confirmed patched versions and upgrade guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-xj6q-8x83-jv6g
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a5e79ef2a4a8d59899bc253
Added to database: 07/20/2026, 19:41:35 UTC
Last enriched: 08/08/2026, 16:56:31 UTC
Last updated: 09/03/2026, 08:54:36 UTC
Views: 112
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.