CVE-2026-23947

CVE-2026-23947 is a critical-severity command injection vulnerability in @orval/core (npm), affecting versions >= 8.0.0-rc.0, < 8.0.2. It is fixed in 8.0.2, 7.19.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

References

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'); /*"

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.

Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command. Typical impact: arbitrary command execution in the application's environment.

Affected versions

@orval/core (>= 8.0.0-rc.0, < 8.0.2) @orval/core (< 7.19.0)

Security releases

@orval/core → 8.0.2 (npm) @orval/core → 7.19.0 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade to Orval 8.0.2

Frequently Asked Questions

  1. What is CVE-2026-23947? CVE-2026-23947 is a critical-severity command injection vulnerability in @orval/core (npm), affecting versions >= 8.0.0-rc.0, < 8.0.2. It is fixed in 8.0.2, 7.19.0. Untrusted input is inserted into a command that is later executed by the application, allowing the attacker to alter the intent of that command.
  2. Which versions of @orval/core are affected by CVE-2026-23947? @orval/core (npm) versions >= 8.0.0-rc.0, < 8.0.2 is affected.
  3. Is there a fix for CVE-2026-23947? Yes. CVE-2026-23947 is fixed in 8.0.2, 7.19.0. Upgrade to this version or later.
  4. Is CVE-2026-23947 exploitable, and should I be worried? Whether CVE-2026-23947 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-23947 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-23947?
    • Upgrade @orval/core to 8.0.2 or later
    • Upgrade @orval/core to 7.19.0 or later

Other vulnerabilities in @orval/core

Stop the waste.
Protect your environment with Kodem.