{"id":"CVE-2025-66457","published":"2025-12-09T20:03:45Z","modified":"2025-12-12T19:39:02Z","title":"Elysia affected by arbitrary code injection through cookie config","vendor":"elysiajs","product":"elysia","tier":"tail","description":{"text":"Elysia is a Typescript framework for request validation, type inference, OpenAPI documentation and client-server communication. Versions 1.4.17 and below are subject to arbitrary code execution from cookie config. When dynamic cookies are enabled (e.g. there  an existing cookie schema), the cookie config is injected into the compiled route without first being sanitised. Availability of this exploit is generally low, but when combined with GHSA-hxj9-33pp-j2cc, it allows for a full RCE chain. An attack requires write access to either the Elysia app's source code (in which case the vulnerability is meaningless) or write access to the cookie config (perhaps where it is assumed to be provisioned by the environment). This issue is fixed in version 1.4.18.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01205,"percentile":0.68181,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc","tags":["x_refsource_MISC"]},{"url":"https://github.com/elysiajs/elysia/pull/1564","tags":["x_refsource_MISC"]},{"url":"https://github.com/elysiajs/elysia/commit/26935bf76ebc43b4a43d48b173fc853de43bb51e","tags":["x_refsource_MISC"]},{"url":"https://github.com/elysiajs/elysia/commit/3af978663e437dccc6c1a2a3aff4b74e1574849e","tags":["x_refsource_MISC"]},{"url":"https://github.com/sportshead/elysia-poc","tags":["exploit"]}],"priority":{"score":23.9,"factors":[{"name":"EPSS percentile","points":13.64},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"elysiajs","affectedVersions":[{"vendor":"elysiajs","product":"elysia","versions":["< 1.4.18"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-12-12T19:37:53.151226Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"elysia","vulnerableRanges":["<1.4.18"],"patched":["1.4.18"],"from":["GHSA-8vch-m3f4-q8jf"],"provenance":"source"}],"summary":{"text":"Elysia, the TypeScript web framework for request validation and OpenAPI documentation, versions 1.4.17 and below, contains a code injection flaw where cookie configuration is inserted into the compiled route without sanitisation when dynamic cookies are enabled. An attacker who can write to the cookie configuration (on a network path with high privileges required, such as where the configuration is assumed to come from the environment) can execute arbitrary code, and the flaw can be chained with a separate issue to achieve full remote code execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:01:34Z"},"euvd":{"id":"EUVD-2025-202179","exploited":false,"provenance":"source"},"exploitRefs":["https://github.com/sportshead/elysia-poc"],"lineage":{"familyId":"fam-elysiajs-elysia-cve-2025-66456","parents":[{"from":"CVE-2025-66456","to":"CVE-2025-66457","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"osv-related","provenance":"source","id":"GHSA-8vch-m3f4-q8jf","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-hxj9-33pp-j2cc","via":"related"},{"kind":"osv-related","provenance":"source","id":"GHSA-8vch-m3f4-q8jf","via":"reference","url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc"},{"kind":"osv-related","provenance":"source","id":"GHSA-hxj9-33pp-j2cc","via":"reference","url":"https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf"},{"kind":"version-step","provenance":"source","package":"npm:elysia","fromFixed":"1.4.17","toFixed":"1.4.18","daysApart":0}]}],"packageHistory":[{"cve":"CVE-2025-66456","published":"2025-12-09","fixed":"1.4.17","kev":false},{"cve":"CVE-2025-66457","published":"2025-12-09","fixed":"1.4.18","kev":false},{"cve":"CVE-2026-30837","published":"2026-03-10","fixed":"1.4.26","kev":false,"link":{"from":"CVE-2025-66457","to":"CVE-2026-30837","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:elysia","fromFixed":"1.4.18","toFixed":"1.4.26","daysApart":91}]}},{"cve":"CVE-2026-31865","published":"2026-03-18","fixed":"1.4.27","kev":false},{"cve":"CVE-2026-56669","published":"2026-07-08","fixed":"1.4.29","kev":false}],"package":"npm:elysia"}}