{"id":"CVE-2025-66456","aliases":["CVE-2025-66456","GHSA-hxj9-33pp-j2cc"],"related":["CVE-2025-66457"],"kind":"vulnerability","state":"published","title":"Elysia vulnerable to prototype pollution with multiple standalone schema validation","summary":"Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation and client-server communication. Versions 1.4.0 through 1.4.16 contain a 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. When combined with GHSA-8vch-m3f4-q8jf this allows for a full RCE by an attacker. This issue is fixed in version 1.4.17. To workaround, remove the `__proto__ key` from body.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation and client-server communication. Versions 1.4.0 through 1.4.16 contain a 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. When combined with GHSA-8vch-m3f4-q8jf this allows for a full RCE by an attacker. This issue is fixed in version 1.4.17. To workaround, remove the `__proto__ key` from body.","source":"cvelist"},{"lang":"en","text":"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```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Elysia es un framework de Typescript para validación de solicitudes, inferencia de tipos, documentación OpenAPI y comunicación cliente?servidor. Las versiones 1.4.0 hasta 1.4.16 contienen una vulnerabilidad de contaminación de prototipos en 'mergeDeep' después de combinar los resultados de dos validaciones de esquema estándar con la misma clave. Debido al orden de combinación, debe existir un any type que se establece como un guardia independiente, para permitir que la '__proto__ prop' sea fusionada. Cuando se combina con GHSA?8vch?m3f4?q8jf, esto permite una ejecución remota de código (RCE) completa por un atacante. Este problema está corregido en la versión 1.4.17. Como solución alternativa, elimine la clave '__proto__' del cuerpo.","source":"nvd"}],"published":"2025-12-09T17:11:53.000Z","modified":"2026-10-14T21:10:00.183Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":">= 1.4.0, < 1.4.17","status":"affected"}],"vendor":"elysiajs","product":"elysia","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.4.0","status":"affected","fixed":"1.4.17"}],"ecosystem":"npm","package":"elysia","purl":"pkg:npm/elysia","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.4.0","fixed":"1.4.17"}],"vendor":"elysiajs","product":"elysia","cpe":"cpe:2.3:a:elysiajs:elysia:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc","tags":["exploit","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf","tags":["exploit","not-applicable","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/elysiajs/elysia/pull/1564","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/elysiajs/elysia/commit/26935bf76ebc43b4a43d48b173fc853de43bb51e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/elysiajs/elysia/commit/3af978663e437dccc6c1a2a3aff4b74e1574849e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66456","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/elysiajs/elysia","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/sportshead/elysia-poc","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-12-09T20:11:35.267Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-66456","url":"https://www.cve.org/CVERecord?id=CVE-2025-66456","licence":"CVE Terms of Use","modified":"2025-12-09T20:35:44.683Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hxj9-33pp-j2cc","url":"https://github.com/advisories/GHSA-hxj9-33pp-j2cc","licence":"CC-BY-4.0","modified":"2026-02-04T03:31:17.532Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-66456","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66456","licence":"Public domain","modified":"2026-10-14T21:10:00.183Z"}],"updatedAt":"2026-11-25T22:59:09.113Z","epss":{"score":0.00596,"percentile":0.49835,"date":"2026-12-01T12:00:22.000Z"}}