Elysia
CVE-2025-66456
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend request with __proto__ in JSON body
-
DeliveryReach route guarded by standalone any schema
-
ExploitMerge pollutes Object.prototype via mergeDeep
-
ExecutionChain with unsanitized cookie-config injection
-
ImpactExecute arbitrary code on server
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an Elysia application (v1.4.0-1.4.16) that defines a standalone guard (schema: 'standalone') whose body schema includes an |
| Impact | The CVSS 4.0 base score of 9.1 (Critical) reflects a network-reachable, unauthenticated flaw (AV:N/PR:N/UI:N) with high confidentiality and integrity impact, but the AT:P metric correctly signals that exploitation is NOT unconditional - a specific attack requirement must be met. That requirement is confirmed by both the description and the commit diff: the Elysia app must use a standalone guard whose body schema contains an |
| Exploit ScenarioDerived | An attacker sends a crafted HTTP request whose JSON body includes a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
Prototype pollution in the Elysia TypeScript framework (npm/elysia, versions 1.4.0 through 1.4.16) allows an unauthenticated remote attacker to merge a __proto__ property into the object prototype through a crafted request body when the application uses a standalone guard whose schema includes an any-typed field. On its own the flaw yields prototype pollution; chained with GHSA-8vch-m3f4-q8jf (arbitrary code injection via unsanitized cookie config in AOT-compiled routes) it can escalate to full remote code execution. Publicly available exploit code exists, but no CISA KEV listing has been observed, and EPSS is low at 0.56% (45th percentile), reflecting the non-default, application-specific configuration required for exploitation.
RemediationAI
Vendor-released patch: upgrade to Elysia 1.4.17 (the version cited as the fix in GHSA-hxj9-33pp-j2cc and delivered by PR https://github.com/elysiajs/elysia/pull/1564, commits 26935bf76ebc43b4a43d48b173fc853de43bb51e and 3af978663e437dccc6c1a2a3aff4b74e1574849e); the GHSA package metadata lists npm/elysia as fixed in 1.4.18, so upgrading to 1.4.18 or later is the safest choice against both advisories. If an immediate upgrade is not possible, the vendor-recommended workaround is to strip the __proto__ key from incoming request bodies before validation or merging, which prevents the pollution primitive but leaves the framework unpatched and requires custom request-handling code that must be maintained and re-verified. Because the full RCE chain depends on the cookie code-injection issue GHSA-8vch-m3f4-q8jf, also sanitize any cookie-related environment input - e.g. escape backticks and ${ sequences in cookie.secrets/cookie.sign values before they reach the Elysia constructor - noting that this is manual escaping that must track future framework changes. The advisory lists AOT compilation (enabled by default) as a precondition for the chained code-injection impact, so disabling AOT may break that second stage, at the cost of the runtime performance and precompilation benefits Elysia's AOT mode provides; prototype pollution alone would still be possible. Regardless of workaround, upgrade to the patched release as the definitive fix, and consult https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc for the authoritative guidance. Patch status at time of analysis: Patch available per vendor advisory, with fixed versions 1.4.17 (advisory) and 1.4.18 (npm metadata).
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, i.e. prototype pollution) inside Elysia's mergeDeep utility in src/utils.ts. When two standard-schema validation results sharing the same key are deep-merged, the merge ordering can allow a __proto__ key to be written onto the prototype; the condition described by the vendor requires an any type configured as a standalone guard (schema: 'standalone') so that the controlling key survives the merge. Elysia is a TypeScript request-validation/type-inference/OpenAPI framework for Node.js (CPE cpe:2.3:a:elysiajs:elysia:*:*:*:*:*:node.js:*:*), and it compiles route handlers ahead of time (AOT is enabled by default), generating JavaScript source for cookie handling. The related advisory GHSA-8vch-m3f4-q8jf shows that cookie configuration values (for example cookie.secrets provisioned from the environment) are interpolated into that generated code without escaping, so an attacker who can influence those values can inject arbitrary statements into the compiled route; prototype pollution supplies the primitive that lets an attacker reach that sink through request processing rather than only through pre-existing source access. The upstream fix adds ['__proto__', 'constructor', 'prototype'] to the list of keys skipped by mergeDeep and introduces an overrideUnsafeQuote helper that escapes backticks and ${ when emitting cookie config into generated code (commits 26935bf76ebc43b4a43d48b173fc853de43bb51e and 3af978663e437dccc6c1a2a3aff4b74e1574849e). Per the independent assessment (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N), exploitation is not unconditional: the standalone-guard-plus-any-type pattern is non-default and application-specific, and full RCE additionally requires the cookie-config injection prerequisites. The CVSS 4.0 base score of 9.1 (Critical) reflects a network-reachable, unauthenticated flaw (AV:N/PR:N/UI:N) with high confidentiality and integrity impact, while the AT:P metric correctly signals the specific attack requirements.
Know when Elysia gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Remote unauthenticated request body triggers it (AV:N/PR:N/UI:N), but AC:H reflects the required standalone-guard-with-`any` merge-ordering condition; high confidentiality/integrity via prototype pollution and chained code execution, no availability impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
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.
Executive ViewAI
A critical flaw in the Elysia TypeScript framework, used by our Node.js services, lets an external attacker manipulate the underlying object model of a running application and - when chained with a separate known issue in the same framework - achieve full remote code execution on the server. The exposure is concentrated in internet-facing services that rely on standalone guards with loosely typed schema fields, a non-default configuration, which limits the blast radius but not the consequences where it applies. Leadership should care because a successful chain means attacker control of production infrastructure, with the associated risks of data exposure, service outage, and regulatory notification obligations.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Code injection in the Elysia TypeScript framework (versions 1.4.17 and below) lets an attacker who can control the cooki
OpenAPI documentation and client-server communication. versions up to 1.4.26 is affected by inefficient regular expressi
NVD
CVE.org
EPSS
GitHub
Exploit-DB