Loading...
Skip to main content

CVE-2026-23947 — Vulnerability in @orval/core — CVE Details

CRITICAL

Orval has a code injection via unsanitized x-enum-descriptions in enum generation

Published January 21, 2026Updated February 28, 2026Source: osv

Summary

### Impact 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. ### Patches Upgrade to Orval 8.0.2 ### References An example OpenAPI showing the issue: ```yaml 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'); /*" ```

Advisory Timeline

  • First published January 21, 2026 (264 days ago).
  • Last revised February 28, 2026 — 38 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @orval/core to 8.0.2 or later
npm install @orval/core@8.0.2
npm
Update @orval/core to 7.19.0 or later
npm install @orval/core@7.19.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@orval/core
npm
All versions8.0.2
@orval/core
npm
All versions7.19.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-23947?
Orval has a code injection via unsanitized x-enum-descriptions in enum generation This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-23947?
CVE-2026-23947 affects @orval/core. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-23947 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-h526-wf6g-67jv

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies