Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @orval/core
  4. ›
  5. CVE-2026-23947

CVE-2026-23947: Orval has a code injection via unsanitized x-enum-descriptions in enum generation

January 21, 2026

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.

References

  • github.com/advisories/GHSA-h526-wf6g-67jv
  • github.com/orval-labs/orval
  • github.com/orval-labs/orval/commit/9e5d93533904936678ba93b5d20f6bca176a4e1e
  • github.com/orval-labs/orval/releases/tag/v8.0.2
  • github.com/orval-labs/orval/security/advisories/GHSA-h526-wf6g-67jv
  • nvd.nist.gov/vuln/detail/CVE-2026-23947

Code Behaviors & Features

Detect and mitigate CVE-2026-23947 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 8.0.2

Fixed versions

  • 8.0.2

Solution

Upgrade to version 8.0.2 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

npm/@orval/core/CVE-2026-23947.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:57 +0000.