CVE-2025-66456: Elysia Elysia Vulnerable To Prototype Pollution Vulnerability
CRITICALCVE-2025-66456 is a CRITICAL elysia vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Elysia libraries in the npm ecosystem. The issue involves elysia vulnerable to prototype pollution with multiple standalone schema validation. Remediation is available by upgrading affected packages to version 1.4.17.
CVE-2025-66456 at a Glance
How to Fix CVE-2025-66456
To remediate this vulnerability, upgrade all affected Elysia dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install elysia@1.4.17
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls elysia
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-66456, inspect your project dependencies using npm:
npm ls elysia
Analyze the terminal output to locate any version of Elysia in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.17), your application is affected.
Note: The npm ls elysia command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Elysia, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66456 Affected Elysia Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
elysia
|
npm |
≥ 1.4.0
< 1.4.17
|
1.4.17
|
References
Frequently Asked Questions
What is CVE-2025-66456?
Which Elysia versions are affected?
What version fixes CVE-2025-66456?
Is elysia affected?
What CWE is associated with CVE-2025-66456?
How can I check npm dependencies for CVE-2025-66456?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hxj9-33pp-j2cc",
"modified" : "2025-12-09T21:37:06Z",
"published" : "2025-12-09T17:11:53Z",
"aliases" : [ "CVE-2025-66456" ],
"summary" : "Elysia vulnerable to prototype pollution with multiple standalone schema validation",
"details" : "Prototype pollution vulnerability in `mergeDeep` after merging results of two standard schema validations with the same key. Due to the ordering of merging, there must be an `any` type that is set as a `standalone` guard, to allow for the `__proto__` prop to be merged.\n\nWhen combined with GHSA-8vch-m3f4-q8jf this allows for a full RCE by an attacker.\n\n### Impact\nRoutes with more than 2 standalone schema validation, eg. zod\n\nExample vulnerable code:\n```typescript\nimport { Elysia } from \"elysia\"\nimport * as z from \"zod\"\n\nconst app = new Elysia()\n\t.guard({\n\t\tschema: \"standalone\",\n\t\tbody: z.object({\n\t\t\tdata: z.any()\n\t\t})\n\t})\n\t.post(\"/\", ({ body }) => ({ body, win: {}.foo }), {\n\t\tbody: z.object({\n\t\t\tdata: z.object({\n\t\t\t\tmessageId: z.string(\"pollute-me\"),\n\t\t\t})\n\t\t})\n\t})\n```\n\n### Patches\nPatched by 1.4.17 (https://github.com/elysiajs/elysia/pull/1564)\n\nReference commit:\n- https://github.com/elysiajs/elysia/pull/1564/commits/26935bf76ebc43b4a43d48b173fc853de43bb51e\n- https://github.com/elysiajs/elysia/pull/1564/commits/3af978663e437dccc6c1a2a3aff4b74e1574849e\n\n### Workarounds\nRemove `__proto__` key from body\n\nExample plugin for removing `__proto__` from body\n\n```typescript\nnew Elysia()\n\t.onTransform(({ body, headers }) => {\n\t\tif (headers['content-type'] === 'application/json')\n\t\t\treturn JSON.parse(JSON.stringify(body), (k, v) => {\n\t\t\t\tif (k === '__proto__') return\n\n\t\t\t\treturn v\n\t\t\t})\n\t})\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "elysia"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.4.0"
}, {
"fixed" : "1.4.17"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf"
}, {
"type" : "WEB",
"url" : "https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66456"
}, {
"type" : "WEB",
"url" : "https://github.com/elysiajs/elysia/pull/1564"
}, {
"type" : "WEB",
"url" : "https://github.com/elysiajs/elysia/commit/26935bf76ebc43b4a43d48b173fc853de43bb51e"
}, {
"type" : "WEB",
"url" : "https://github.com/elysiajs/elysia/commit/3af978663e437dccc6c1a2a3aff4b74e1574849e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/elysiajs/elysia"
}, {
"type" : "WEB",
"url" : "https://github.com/sportshead/elysia-poc"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-09T17:11:53Z",
"nvd_published_at" : "2025-12-09T20:15:54Z"
}
}