Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Axios: Prototype pollution auth subfields can inject Basic auth

0
Medium
Published: 07/20/2026 (07/20/2026, 17:51:17 UTC)
Source: GCVE Database
Product: axios

Description

Axios versions from 1.15.2 up to but not including 1.18.0 contain a prototype pollution read-side vulnerability in Basic auth subfield handling. If an application using axios is already vulnerable to prototype pollution and makes a request with an auth object missing username or password properties, axios may inherit these values from Object.prototype and inject attacker-controlled Basic auth credentials into outbound requests. This can lead to outbound request tampering, including injection or replacement of Authorization headers, but does not directly disclose existing credentials. The vulnerability requires a separate prototype pollution primitive in the host application and specific axios usage patterns.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
Low
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Affected software

npmghsa
axios
Affected versions
>=1.15.2 <1.18.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/20/2026, 19:49:04 UTC

Technical Analysis

Axios versions >=1.15.2 <1.18.0 have a vulnerability where Basic auth subfields (username and password) are read without own-property checks, allowing prototype pollution in Object.prototype.username and Object.prototype.password to influence the Authorization header in outbound requests. This occurs when axios receives an auth object lacking these own properties, causing it to read inherited polluted values. The vulnerability affects Node HTTP adapter and browser/fetch helpers. Exploitation requires a pre-existing prototype pollution vulnerability in the host environment and axios calls passing empty or partial auth objects. The fix involves adding own-property checks to these subfield reads.

Potential Impact

An attacker able to pollute Object.prototype.username or Object.prototype.password can cause axios to send attacker-chosen Basic auth credentials in outbound requests when the auth object is empty or missing these fields. This can tamper with outbound requests by injecting or replacing Authorization headers, potentially causing authorization failures or unintended access. However, this does not automatically disclose legitimate credentials from axios or the application. Credential disclosure would require additional application-specific conditions such as observable request destinations and partial real auth objects.

Mitigation Recommendations

No official patch or fix is currently confirmed. To mitigate, avoid passing empty or partial auth objects to axios requests. Only set auth when both username and password are explicitly provided as own properties. Applications merging untrusted input should filter prototype pollution vectors such as __proto__, constructor, and prototype. Use null-prototype objects or explicitly copy own properties when materializing optional auth objects. Monitor vendor advisories for official fixes and apply them when available.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 07/20/2026, 19:49:04 UTC

Last updated: 07/21/2026, 06:45:13 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses