CVE-2026-23947: Orval MCP client is vulnerable to code injection via unsanitized x-enum-descriptions in enum generation

Published Jan 20, 2026
·
Updated

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('childprocess').execSync('id'); /"

Other sources

Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions prior to 7.19.0 until 8.0.2 are vulnerable to arbitrary code execution in environments consuming generated clients. This issue is similar in nature to CVE-2026-22785, but affects a different code path in @orval/core that was not addressed by CVE-2026-22785's 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. Orval 7.19.0 and 8.0.2 contain a fix for the issue.

NVD

Affected Software

5 affected componentsFixes available
npm/@orval/core>=7.10.0<8.0.2
npm/@orval/core<7.19.0
7.19.0
npm/@orval/core>=8.0.0-rc.0<8.0.2
8.0.2
orval orval<7.19.0
orval orval>=8.0.0<8.0.2

Event History

Jan 20, 2026
CVE Published
via MITRE·12:19 AM
Data Sourced
via MITRE·12:19 AM
DescriptionWeakness
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 AM
Affected Software
Jan 21, 2026
Advisory Published
via GitHub·01:01 AM
Data Sourced
via GitHub·01:01 AM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-23947?

CVE-2026-23947 has been classified as a critical vulnerability due to the potential for arbitrary code execution.

2

How do I fix CVE-2026-23947?

To mitigate CVE-2026-23947, upgrade the Orval MCP client to version 8.0.3 or later.

3

Which versions of Orval MCP are affected by CVE-2026-23947?

Orval MCP client versions from 7.10.0 to 8.0.2 are vulnerable to CVE-2026-23947.

4

What type of attack does CVE-2026-23947 enable?

CVE-2026-23947 enables code injection attacks due to unsanitized x-enum-descriptions.

5

Can CVE-2026-23947 impact production environments?

Yes, CVE-2026-23947 can impact production environments if vulnerable versions are used, leading to potential arbitrary code execution.

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