November 26, 2026
Elysia vulnerabilities - seven critical code injection and RCE flaws in the Elysia TypeScript framework fixed in 1.4.31

The Elysia vulnerabilities disclosed on November 24, 2026 include seven critical flaws in the Elysia TypeScript web framework, rated up to CVSS 9.8. Six allow code injection or remote code execution in the server process, and one bypasses WebSocket validation. No exploitation has been confirmed, and every critical issue is fixed in elysia 1.4.31, so apps on 1.4.30 or earlier should upgrade.

What are the new Elysia vulnerabilities?

Elysia maintainer SaltyAom published 28 advisories in the project’s GitHub security advisory list on November 24, 2026. Seven are rated critical, nine high, ten moderate and two low. None of the seven critical advisories has a CVE ID yet.

Six of the critical issues share one root cause. Elysia compiles each route handler into JavaScript source and runs it with new Function(). Several inputs reached that source without escaping. A crafted value can break out of its string and run code with the privileges of the server process.

Those six need one condition in the target app. It must build schema property names, file field names or route paths from data it does not control. The reporters cite form builders, tenant-specific schemas, webhook paths and CMS page slugs. The GHSA-g7gw-g6xr-hc3w advisory states that apps with fully developer-authored schemas are not affected.

The seventh flaw works differently. It needs no untrusted schema, only a WebSocket route on Bun with an asynchronous validator.

The seven critical advisories

Advisory Flaw CVSS (GitHub advisory) CWE Reporter
GHSA-8m2q-mx4w-gx5x Code injection via File field name in fileType AOT path 9.8 (CVSS 3.1) CWE-94 4holyfuck
GHSA-7f78-4837-6rc4 WebSocket validation and auth bypass with async Standard Schema validators 9.1 (CVSS 4.0) CWE-20, CWE-287 Divsonar
GHSA-952m-m7x7-mg46 Unauthenticated RCE via t.File schema property names 9.0 (CVSS 3.1) CWE-95 kapeka0
GHSA-7jpf-w5v7-43vw Code injection in t.File validation via form field name 9.0 (CVSS 3.1) CWE-95 krataia
GHSA-g7gw-g6xr-hc3w RCE via schema property names in the exact-mirror dependency 9.0 (CVSS 3.1) CWE-94, CWE-1395 Gayang2902
GHSA-49jc-gq6m-2p59 Route path injected into compiled source (RCE and DoS) Not listed CWE-20, CWE-94 HocVoNgThai
GHSA-mmpg-3m88-65rj RCE via route path in the static-route switch dispatcher Not listed CWE-94, CWE-1336 StarPlatinu

All seven carry the “Critical” rating. GHSA-49jc and GHSA-mmpg give no CVSS score or vector.

Technical details

File field names. Three reports cover the same sink. Elysia emits a fileType() check for t.File or t.Files fields that declare a type. In 1.4.30 the field name was pasted into that call unescaped. GHSA-952m says the injected expression runs before validation, so even an invalid upload triggers it. The GHSA-7jpf reporter says they read environment variables and files, and ran shell commands on both Bun and Node. The attack request looks like an ordinary file upload.

exact-mirror. Elysia 1.3.0 to 1.4.30 build a “clean” function for each schema through the exact-mirror library when normalize is left at its default. The exact-mirror 0.x line inserted property names without escaping. The request still fails with a 422 error, but the code has already run. Unlike the September flaw, no schema default value is needed.

Route paths. GHSA-49jc names two sinks: a template literal in composeHandler and a switch-case label in composeGeneralHandler. A single quote in a route path can crash the process at startup or on the first request. Code execution needs a handler that reads route from context, or tracing. GHSA-mmpg adds that the injected code can run on any later request, not only requests to the malicious route.

WebSocket validation. GHSA-7f78 says the Bun adapter did not await validators that return a Promise. The check then treated the message as valid. Invalid incoming messages reached the handler, and invalid outgoing responses reached the client. If the validator enforces a session token, role or room membership, a forged message gets through. The HTTP path in the same releases awaits correctly and returns 422.

Gaps left by the September fix

GHSA-gmm9-qwx3-2m3h, published September 1, 2026 with a CVSS 3.1 score of 9.0, covered unescaped schema defaults and property names. GHSA-7jpf explains that its fix in 1.4.30 wrapped header, params and query keys and body defaults in JSON.stringify. It missed two fileType lines.

GHSA-49jc calls itself a sibling gap, because the fix never touched route paths. GHSA-8m2q describes the fileType AOT path as a case the fix missed. GHSA-g7gw, GHSA-952m and GHSA-mmpg also describe sinks outside that fix.

CVE News Daily compared the published npm packages. In 1.4.30 the compiler builds fileType(c.body.${k} with the raw key. In 1.4.31 it uses bracket access with JSON.stringify(k), and it also escapes route paths with JSON.stringify(path). Version 1.4.31 raises the exact-mirror requirement from ^0.2.7 to ^0.2.9.

The other 21 advisories

The nine high-severity advisories include three denial-of-service flaws in multipart form parsing and three validation or authorization bypasses. Those bypasses involve async WebSocket validation, dynamic mode and Bun native static routes. The rest cover route-path template injection, a cookie transform bug and skipped hooks on mount() routes. The ten moderate issues cover denial of service, server-sent event injection, cookie handling, encoded-slash path traversal and AI-agent prompt-injection files shipped in the npm package. The two low issues involve prototype-named properties.

Are the Elysia vulnerabilities being exploited?

No vendor, CERT or security company has confirmed exploitation of these flaws as of November 25, 2026. None has a CVE ID, so none is listed in the CISA Known Exploited Vulnerabilities catalog.

Each of the seven critical advisories includes proof-of-concept material, and the advisories are public. We found no published counts of exposed Elysia servers.

Affected and fixed versions

Product Branch Affected versions Fixed version
elysia (npm) – GHSA-8m2q-mx4w-gx5x 1.4.x <= 1.4.30 1.4.31
elysia (npm) – GHSA-7f78-4837-6rc4 1.4.x 1.4.17 to 1.4.30 per the description (range field lists = 1.4.30) 1.4.31
elysia (npm) – GHSA-952m-m7x7-mg46 1.4.x >= 1.4.0, <= 1.4.30 1.4.31
elysia (npm) – GHSA-7jpf-w5v7-43vw 1.4.x <= 1.4.30 1.4.31
elysia (npm) – GHSA-g7gw-g6xr-hc3w 1.3.x, 1.4.x >= 1.3.0, <= 1.4.30 1.4.31
elysia (npm) – GHSA-49jc-gq6m-2p59 1.4.x <= 1.4.30 1.4.31
elysia (npm) – GHSA-mmpg-3m88-65rj 1.4.x <= 1.4.30 1.4.31

Three advisories comment on Elysia 2.0 pre-releases. GHSA-952m says 2.0.0-rc.0 removed the vulnerable code. GHSA-g7gw says 1.2.x and 2.0.0 beta and exp builds have no exact-mirror dependency. GHSA-7f78 says 2.0.0-rc.1 rejects async validators on WebSocket routes.

How to fix the Elysia vulnerabilities

Upgrade the elysia package to 1.4.31 or later. The npm registry shows 1.4.31 published on November 5, 2026, and 1.4.32 on November 11 as the current release. Rebuild and redeploy every service that bundles the framework.

Check that your lockfile resolves exact-mirror 0.2.9 or later, since 1.4.31 declares that range. A stale lockfile or a pinned override could keep the old library in place.

If you cannot patch yet

The GHSA-7jpf advisory lists these workarounds for the t.File sink:

  • Declare form fields statically wherever possible.
  • If schemas must be built per form or tenant, allow only letters, digits, underscores and hyphens in field names. Blocking only . and [ is not enough.
  • Set aot: false or ELYSIA_AOT=false. The reporter measured that this avoids the injection, at a performance cost.

Take care with the last option. GHSA-wc83-j7p2-6rv9, a high-severity advisory in the same batch, says onBeforeHandle guards are skipped for mount() routes when aot is false.

For the exact-mirror flaw, GHSA-g7gw identifies normalize: false and normalize: 'typebox' as unaffected settings. The WebSocket and route-path advisories list no workarounds.

How to check if you are affected

Find the installed elysia version in your lockfile or node_modules/elysia/package.json. Any version up to 1.4.30 is in range.

Then review how the app defines routes and schemas. The code injection flaws matter when keys passed to t.Object, t.File field names or route paths come from users, configuration or a database. The exact-mirror flaw also needs normalize at its default or set to 'exactMirror'. The WebSocket flaw affects Bun apps whose ws() routes use async validators, such as async Zod refinements or Valibot async checks.

Why it matters

This is the third round of code-generation injection flaws in Elysia in a year. In December 2025, CVE-2025-66457 covered code injection through cookie config. GHSA-gmm9 followed in September 2026. The fixes so far escaped specific inputs one at a time, and new sinks kept turning up.

Multi-tenant platforms and form builders face the highest risk. Their core feature is turning user input into schemas or routes, which is the exact precondition for six of the seven flaws.

Timing also matters. Version 1.4.31 shipped about three weeks before the advisories went public. Teams that track the latest 1.4.x release already have the fixes. Teams that pin versions may have had no reason to move before November 24.

Several reports overlap, and four of the seven critical reports note AI assistance. The 1.4.30 release notes say the 1.4.x line now receives only security updates. Users still have no CVE IDs to track in scanners that rely on NVD data.

Timeline

Date Event
August 26, 2026 Elysia 1.4.30 released with the GHSA-gmm9 fix
September 1, 2026 GHSA-gmm9-qwx3-2m3h published
November 4, 2026 exact-mirror 0.2.9 published on npm
November 5, 2026 Elysia 1.4.31 published on npm
November 11, 2026 Elysia 1.4.32 published on npm
November 24, 2026 28 advisories published, including seven critical

Leave a Reply

Your email address will not be published. Required fields are marked *