Axios Prototype Pollution leads to RCE (CVE-2026-40175)
CVE-2026-40175
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.0, the Axios library is vulnerable to a specific "Gadget" attack chain that allows Prototype Pollution in any third-part...
Overview
A critical vulnerability (CVE-2026-40175) in the Axios HTTP client library for Node.js and browsers allows a specific “gadget” attack chain. This flaw enables an attacker to escalate a Prototype Pollution vulnerability in any other library used by the application into full Remote Code Execution (RCE) or cloud compromise.
Technical Details
Axios versions prior to 1.15.0 contain a dangerous code pattern. If a separate Prototype Pollution vulnerability exists elsewhere in the application’s dependency chain, an attacker can use Axios as a “gadget” to chain these flaws. This chaining transforms a lower-severity pollution issue into a high-impact exploit. The attack is network-based, requires no user interaction or special privileges, and has low complexity, leading to its maximum CVSS score of 10.0.
A particularly severe outcome of this chain is the potential for a full AWS cloud compromise. By exploiting this flaw, an attacker could bypass the Instance Metadata Service v2 (IMDSv2) security controls on cloud instances, granting them access to sensitive cloud credentials and permissions.
Impact
The impact is severe for any application using a vulnerable version of Axios alongside a library with a Prototype Pollution bug. Successful exploitation grants an attacker the ability to execute arbitrary code on the server with the same permissions as the Node.js application process. This can lead to complete system takeover, data theft, and, in cloud environments, lateral movement to compromise the entire cloud account and its resources.
Remediation and Mitigation
The primary and only complete mitigation is to upgrade the Axios library to version 1.15.0 or later. This version contains the necessary fix to break the gadget chain.
Immediate Actions:
- Update Axios: Run
npm update axiosoryarn upgrade axiosto ensure version 1.15.0+ is installed. - Audit Dependencies: Review your application’s dependency tree for other known Prototype Pollution vulnerabilities, as these are the required entry point for this attack chain. Use tools like
npm auditor software composition analysis (SCA) scanners. - Restrict Network Access: For applications running in cloud environments like AWS, ensure that instance metadata service (IMDS) access is restricted according to the principle of least privilege. This can limit the impact of a successful IMDSv2 bypass.
Security Insight
This vulnerability underscores the escalating risk of “gadget” attacks in modern software ecosystems, where a seemingly benign library can become a critical link in an exploit chain. Similar to the risks posed by deserialization gadgets in frameworks like LangChain, it highlights that an application’s overall security is only as strong as the weakest interaction between its dependencies. It serves as a stark reminder for developers to treat all third-party code, especially ubiquitous utilities like HTTP clients, as potential attack surface.
Further Reading
Never miss a critical vulnerability
Get real-time security alerts delivered to your preferred platform.
Related Advisories
Hot Chocolate is an open-source GraphQL server. Prior to versions 12.22.7, 13.9.16, 14.3.1, and 15.1.14, Hot Chocolate's recursive descent parser `Utf8GraphQLParser` has no recursion depth limit. A cr...
ChurchCRM is an open-source church management system. In versions prior to 7.2.0, the database backup restore functionality extracts uploaded archive contents and copies files from the Images/ directo...
The goodoneuz/pay-uz Laravel package (<= 2.2.24) contains a critical vulnerability in the /payment/api/editable/update endpoint that allows unauthenticated attackers to overwrite existing PHP payment ...
SourceCodester Simple Music Cloud Community System v1.0 is vulnerable to SQL Injection in the file /music/view_user.php....