Arbitrary Code Injection in Orval via x-enumDescriptions
CVE-2026-23947 is a critical code injection vulnerability in Orval/@orval/core, a tool that generates type-safe TypeScript/JavaScript clients from OpenAPI v3 and Swagger v2 specifications. The flaw affects vulnerable Orval versions prior to the fixed releases and is triggered when Orval processes an untrusted OpenAPI specification containing attacker-controlled data in the x-enumDescriptions field. In the vulnerable code path, getEnumImplementation() embeds x-enumDescriptions into generated code during const enum generation without proper escaping, allowing arbitrary TypeScript/JavaScript to be injected into generated schema/client files. The issue is described as similar to CVE-2026-22785 but affecting a different @orval/core code path that was not addressed by the earlier fix.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows arbitrary TypeScript/JavaScript to be written into generated client/schema files. If those generated artifacts are subsequently built, tested, imported, or executed, the injected payload can execute in the consuming environment with the privileges of the affected developer workstation, CI runner, or application process. This creates a software supply-chain risk and can lead to compromise of secrets, environment variables, tokens, application data, and potentially broader system access depending on the privileges of the execution context.
If you can’t patch tonight, do this now.
Do not generate clients from untrusted or unreviewed OpenAPI/Swagger specifications. Restrict who can modify API specifications, pin and review specification sources, and treat vendor extension fields such as x-enumDescriptions as untrusted input. Until patched, run code generation only in isolated, sandboxed environments with minimal filesystem, network, and secret access, and avoid executing or importing generated artifacts produced from externally supplied specifications.
Patch, then assume compromise.
Upgrade Orval/@orval/core to a fixed version. The provided content states that Orval 8.0.2 contains a fix; other provided context also states 7.19.0 contains a fix for this issue, but the version information in the supplied material is inconsistent. Based on the strongest repeated references in the content, upgrading to 8.0.2 or later is the safest verified remediation. After upgrading, regenerate affected clients from trusted specifications and review generated artifacts for unexpected injected code if untrusted specs may have been processed previously.
No validated public exploits yet. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.