# CVE-2025-66457: Elysia affected by arbitrary code injection through cookie config

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: Present; Privileges required: High; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.21% (percentile 68, 2026-11-26)
- **CWE:** CWE-94
- **Aliases:** GHSA-8vch-m3f4-q8jf
- **Published:** 2025-12-09T17:12:05.000Z
- **Modified:** 2026-10-14T21:10:00.183Z

## Who should check

- Projects that depend on npm package elysia (\< 1.4.18)
- Anyone running elysiajs elysia \< 1.4.18

## Description

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.

## Affected and fixed versions

- npm `elysia`: affected \< 1.4.18; fixed 1.4.18 (osv)
- elysiajs elysia: \< 1.4.18 (cvelist)

## Mitigation

- Upgrade elysia to 1.4.18 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-66457. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-66457.md
Affected: elysia < 1.4.18
Fixed in: 1.4.18

Steps:
1. Search this machine and project for elysia (npm), elysiajs elysia: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-66457 being exploited?

There is no confirmed exploitation: CVE-2025-66457 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 1.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-66457?

High: CVSS 7.5 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2025-66457?

elysia \< 1.4.18.

### Is there a fix for CVE-2025-66457?

Yes. Fixed in 1.4.18. Upgrade elysia to 1.4.18 or later.

### How do I check if I'm affected by CVE-2025-66457?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/elysiajs/elysia/security/advisories/GHSA-8vch-m3f4-q8jf>
- vendor: <https://github.com/elysiajs/elysia/security/advisories/GHSA-hxj9-33pp-j2cc>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-66457>
- patch: <https://github.com/elysiajs/elysia/pull/1564>
- patch: <https://github.com/elysiajs/elysia/commit/26935bf76ebc43b4a43d48b173fc853de43bb51e>
- patch: <https://github.com/elysiajs/elysia/commit/3af978663e437dccc6c1a2a3aff4b74e1574849e>
- exploit: <https://github.com/sportshead/elysia-poc>
- other: <https://github.com/elysiajs/elysia>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-66457>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-8vch-m3f4-q8jf> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-66457> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-66457>
