
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-23947 is a critical code injection vulnerability in Orval, a tool that generates type-safe TypeScript/JavaScript clients from OpenAPI v3 or Swagger v2 specifications. The flaw resides in the @orval/core package and 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 the getEnumImplementation() function. Affected versions include all releases prior to 7.19.0 and versions 8.0.0-rc.0 through 8.0.2 (exclusive). The vulnerability was published on January 19–20, 2026. It carries a CVSS v3.1 score of 9.8 (Critical) and a CVSS v4.0 score of 9.3 (Critical) (Github Advisory, Red Hat CVE).
The root cause is improper neutralization of special elements during code generation (CWE-77, CWE-94): the getEnumImplementation() function in @orval/core directly embeds values from the x-enumDescriptions OpenAPI extension field into generated TypeScript const enum blocks without sanitization or escaping. An attacker crafts a malicious OpenAPI specification containing a payload such as "pwned */ require('child_process').execSync('id'); /*" in the x-enumDescriptions array, which breaks out of the JSDoc comment context and injects executable JavaScript. The injection occurs at code-generation time, meaning the malicious code is written into the generated schema files and subsequently executed when those files are consumed by downstream applications. This is a distinct code path from the previously patched CVE-2026-22785 and was not addressed by that fix (Github Advisory, Orval Security Advisory).
Successful exploitation results in arbitrary code execution within any environment that consumes Orval-generated client files, leading to full compromise of confidentiality, integrity, and availability of the affected application. An attacker can exfiltrate sensitive data, modify or delete application data, and disrupt service availability — all without requiring authentication or user interaction. The supply-chain nature of this attack means that a single malicious OpenAPI specification can propagate injected code to all downstream consumers of the generated clients, significantly amplifying the blast radius (Github Advisory, Red Hat CVE).
A public proof-of-concept exploit is available on GitHub at https://github.com/boroeurnprach/CVE-2026-23947-PoC, published shortly after disclosure (Feedly). As of the time of reporting, there is no confirmed evidence of active in-the-wild exploitation. The EPSS score is approximately 0.05% (16th percentile), indicating a currently low but non-negligible probability of exploitation in the near term (Github Advisory). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No specific threat actor attribution has been reported. The vulnerability is detectable by Qualys scanner (detection ID: 5007113).
x-enumDescriptions entry. For example:components:
schemas:
EvilEnum:
type: string
enum:
- PWNED
x-enumDescriptions:
- "pwned */ require('child_process').execSync('id'); /*"orval --config orval.config.ts), the getEnumImplementation() function in @orval/core embeds the unsanitized x-enumDescriptions value directly into the generated TypeScript schema file.require('child_process').execSync('id')) runs with the privileges of the consuming process.require('child_process'), execSync, exec, spawn, or other Node.js process execution calls outside of comment blocks; presence of unexpected .js or .ts files with obfuscated or encoded payloads in the Orval output directory.sh, bash, cmd.exe, curl, wget, powershell) as children of the node process.uid=, user/group information) interleaved with normal Orval generation output; Node.js error stack traces referencing getEnumImplementation in @orval/core.CVE-2026-23947-PoC) or related artifacts on developer machines; unexpected modifications to package.json or package-lock.json adding new dependencies after a code generation step (Github Advisory).Upgrade Orval to version 7.19.0 (for the v7 branch) or 8.0.2 (for the v8 branch), both of which contain the fix for this vulnerability — specifically the commit that ensures x-enum values are properly JS-escaped before being embedded in generated code (Github Advisory, Orval v8.0.2 Release). As an interim workaround, restrict Orval to processing only OpenAPI specifications from fully trusted, internally controlled sources, and implement validation/review of any third-party or externally sourced specs before use. Organizations should also audit any previously generated client files produced by affected versions for signs of injected code.
Security Online Info published a supply chain alert highlighting the critical CVSS 9.3 score and the code injection risk (Security Online). Endor Labs discussed the vulnerability in the context of AI infrastructure and MCP security, noting the broader implications for supply chain security (Endor Labs). A dev.to post titled "CVE-2026-23947: Comment Injection to RCE — Breaking Orval with JSDoc" provided a technical walkthrough of the exploitation mechanism (dev.to). The Secret CISO newsletter also covered the disclosure as part of broader supply chain security concerns.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."