Kritisch

Elysia vulnerable to prototype pollution with multiple standalone schema validation

  • Veröffentlicht: 09.12.2025
  • Aktualisiert: 11.10.2026 10:22

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:

ts
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:

Workarounds

Remove __proto__ key from body

Example plugin for removing __proto__ from body

ts
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
			})
	})

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
npm-Paket elysia >= 1.4.0, < 1.4.17 1.4.17

Verweise

CVSS-Wert -
CVSS-Vektor
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
Schwäche (CWE)
CWE-1321
Plattform
npm
Paket
elysia
Veröffentlicht
09.12.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-hxj9-33pp-j2cc - CC BY 4.0

Schwachstellenhistorie: elysia

Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
5
Erste → letzte
12.2025 09.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Kritisch 1
  • Hoch 3
  • Mittel 1

Veröffentlichungen pro Jahr

  1. 2025: 2
  2. 2026: 3
  1. Mittel · 6.5 CVE-2026-31865 < 1.4.27 1.4.27
  2. Hoch · 7.5 CVE-2026-30837 < 1.4.26 1.4.26
  3. Elysia vulnerable to prototype pollution with multiple standalone schema validation dieser Eintrag
    Kritisch CVE-2025-66456 >= 1.4.0, < 1.4.17 1.4.17

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.