CVE-2026-23947: Code Injection Vulnerability in @orval/core via Unsanitized x-enum-descriptions

@orval/core Updated 21 Jan 2026

Summary

21/01/2026
Yes i
Critical
9.3

CVE-2026-23947: Orval has a code injection via unsanitized x-enum-descriptions in enum generation. Affects @orval/core versions < 8.0.2. Fixed in 8.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @orval/core package is a tool designed for generating TypeScript and JavaScript clients from OpenAPI specifications. It simplifies the process of client generation, allowing developers to easily consume APIs. However, it has a critical vulnerability that arises from improper handling of user-defined inputs in OpenAPI specifications, specifically in the x-enumDescriptions field.

Vulnerability Detail

The vulnerability allows untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript code into generated clients. This occurs through the x-enumDescriptions field, which is embedded without proper escaping in the getEnumImplementation() function. As a result, when the generated clients are executed, they can execute malicious code, leading to arbitrary code execution in environments consuming these clients. This issue is similar to the recently patched MCP vulnerability (CVE-2026-22785) but affects a different code path in the @orval/core package.

How To Fix

Minimum fixed version

8.0.2

This is the first release that contains the fix.

npm install @orval/core@8.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to upgrade to the patched version as soon as possible.

Conclusion

In summary, CVE-2026-23947 is a critical code injection vulnerability in the @orval/core package that allows for arbitrary code execution through unsanitized x-enumDescriptions in OpenAPI specifications. Users are strongly advised to upgrade to version 8.0.2 to mitigate this risk.

See every vulnerability recorded for @orval/core →

Share this vulnerability

FAQ

The vulnerability allows for arbitrary code execution through unsanitized inputs in the x-enumDescriptions field of OpenAPI specifications.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your package-lock.json for vulnerabilities.

If exploited, this vulnerability can lead to the execution of malicious code in environments that consume the generated clients, potentially compromising system integrity.

Yes, upgrading to version 8.0.2 of @orval/core addresses this vulnerability.

The CVSS score for this vulnerability is 9.3, indicating a critical severity level.

Related vulnerabilities

Recent vulnerabilities recorded for @orval/core.

How To Fix

Minimum fixed version

8.0.2

This is the first release that contains the fix.

npm install @orval/core@8.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback