Prototype Pollution in @apollo/gateway
Summary
GHSA-74cr-77xc-8g6r: Prototype Pollution in @apollo/gateway. Affects @apollo/gateway versions < 0.6.2. Fixed in 0.6.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @apollo/gateway package is a part of the Apollo GraphQL ecosystem and is used for building a gateway that connects multiple GraphQL services. It provides a unified interface to access data from various services. The package is widely used in Node.js applications.
Vulnerability Detail
Versions of @apollo/gateway prior to 0.6.2 are vulnerable to Prototype Pollution. The package uses deepMerge() to merge objects, which can be exploited by attackers through queries with GraphQL aliases. By crafting specific payloads, attackers can modify the Object prototype and override properties of all objects in the application. This can lead to Denial of Service attacks or, when combined with other vulnerabilities, even Remote Code Execution. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.3.
How To Fix
Latest published version: 2.14.4 as of 22 Oct 2026
npm install @apollo/gateway@2.14.4
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.6.2
This is the first release that contains the fix.
npm install @apollo/gateway@0.6.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The @apollo/gateway package prior to version 0.6.2 is vulnerable to Prototype Pollution, which can have severe consequences including Denial of Service and Remote Code Execution. It is highly recommended to upgrade to the latest version of the package to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for @apollo/gateway →
FAQ
The @apollo/gateway package is a part of the Apollo GraphQL ecosystem and is used for building a gateway that connects multiple GraphQL services. It provides a unified interface to access data from various services.
Prototype Pollution is a vulnerability that occurs when an attacker can modify the prototype of an object, allowing them to control or modify properties and behaviors of the object and potentially leading to security issues.
deepMerge() is a function used in @apollo/gateway to merge objects. It combines the properties of multiple objects into a single object, recursively merging nested properties.
The consequences of this vulnerability include the ability for attackers to override properties of all objects in the application, which can lead to Denial of Service attacks or, when combined with other vulnerabilities, even Remote Code Execution.
To mitigate the risk, it is recommended to upgrade to version 0.6.2 or later of the @apollo/gateway package. Keeping the package up to date with the latest security patches is crucial to prevent exploitation of this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for @apollo/gateway.