CVE-2025-66456: Elysia Prototype Pollution Vulnerability Leading to RCE
Summary
CVE-2025-66456: Elysia vulnerable to prototype pollution with multiple standalone schema validation. Affects elysia versions >= 1.4.0, < 1.4.17. Fixed in 1.4.17. 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
Elysia is a web framework designed for building APIs and web applications in Node.js. It offers a range of features including schema validation, routing, and middleware support. However, it has been found to be vulnerable to a prototype pollution issue when multiple standalone schema validations are used, which can lead to severe security risks.
Vulnerability Detail
The vulnerability arises from the mergeDeep function, which merges results from two schema validations that share the same key. If an any type is set as a standalone guard, it allows the merging of the __proto__ property, leading to prototype pollution. This vulnerability can be exploited in routes that utilize more than two standalone schema validations, such as with the Zod library. When combined with another vulnerability (GHSA-8vch-m3f4-q8jf), it can lead to remote code execution (RCE) by an attacker.
How To Fix
Latest published version: 1.4.30 as of 23 Oct 2026
npm install elysia@1.4.30
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.4.17
This is the first release that contains the fix.
npm install elysia@1.4.17
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can remove the __proto__ key from the request body. Here is an example plugin that demonstrates how to do this:
new Elysia()
.onTransform(({ body, headers }) => {
if (headers['content-type'] === 'application/json')
return JSON.parse(JSON.stringify(body), (k, v) => {
if (k === '__proto__') return
return v
})
})
Conclusion
The Elysia framework has a critical vulnerability (CVE-2025-66456) related to prototype pollution that can lead to remote code execution. It is crucial to update to the patched version (1.4.17) or implement the provided workaround to secure your application against potential attacks.
See every vulnerability recorded for elysia →
FAQ
Prototype pollution is a security vulnerability that allows an attacker to manipulate an object's prototype, potentially leading to unauthorized access or control over the application.
An attacker can exploit this vulnerability by crafting a request that includes malicious payloads, allowing them to modify the prototype of objects in the application, which can lead to remote code execution.
If left unaddressed, this vulnerability can lead to severe security breaches, including unauthorized access to sensitive data and remote code execution, compromising the entire application.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file. You can check if your application is affected by this vulnerability using the Vulert playground.
If immediate updates are not possible, implement the provided workaround to remove the __proto__ key from the request body to mitigate the risk until you can apply the patch.
References
Related vulnerabilities
Recent vulnerabilities recorded for elysia.