CVE-2025-66456: Elysia vulnerable to prototype pollution with multiple standalone schema validation

Published Dec 9, 2025
·
Updated

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.

Other sources

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.

Impact Routes with more than 2 standalone schema validation, eg. zod

Example vulnerable code: typescript import { Elysia } from "elysia" import as z from "zod"

const app = new Elysia() .guard({ schema: "standalone", body: z.object({ data: z.any() }) }) .post("/", ({ body }) => ({ body, win: {}.foo }), { body: z.object({ data: z.object({ messageId: z.string("pollute-me"), }) }) })

Patches Patched by 1.4.17 (https://github.com/elysiajs/elysia/pull/1564)

Reference commit: - https://github.com/elysiajs/elysia/pull/1564/commits/26935bf76ebc43b4a43d48b173fc853de43bb51e - https://github.com/elysiajs/elysia/pull/1564/commits/3af978663e437dccc6c1a2a3aff4b74e1574849e

Workarounds Remove proto key from body

Example plugin for removing proto from body

typescript new Elysia() .onTransform(({ body, headers }) => { if (headers['content-type'] === 'application/json') return JSON.parse(JSON.stringify(body), (k, v) => { if (k === 'proto') return

return v }) })

GitHub

Affected Software

2 affected componentsFixes available
npm/elysia>=1.4.0<1.4.17
1.4.17
elysiajs Elysia Node.js>=1.4.0<1.4.17

Event History

Dec 9, 2025
Advisory Published
via GitHub·05:11 PM
Data Sourced
via GitHub·05:11 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·07:43 PM
Data Sourced
via MITRE·07:43 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-66456?

The severity of CVE-2025-66456 is classified as moderate due to its potential for prototype pollution.

2

How do I fix CVE-2025-66456?

To fix CVE-2025-66456, update the elysia package to version 1.4.17 or later.

3

What is the impact of CVE-2025-66456?

CVE-2025-66456 can lead to unauthorized property manipulation and alteration in JavaScript objects due to prototype pollution.

4

Which versions of elysia are affected by CVE-2025-66456?

CVE-2025-66456 affects versions of the elysia package from 1.4.0 to 1.4.16.

5

Is CVE-2025-66456 being actively tracked or reported?

Yes, CVE-2025-66456 is actively reported and tracked as part of ongoing security advisories on GitHub.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203