Critical Code Injection Vulnerability in @orval/core Package

@orval/core Updated 31 Jan 2026

Summary

30/01/2026
CRITICAL
Yes i
Critical
9.3

GHSA-gch2-phqh-fg9q: Orval has Code Injection via unsanitized x-enum-descriptions using JS comments. Affects @orval/core across 2 version ranges.

>= 7.19.0, < 7.21.0 >= 8.0.0, < 8.2.0

Fixed in 7.21.0 or 8.2.0, depending on the release line you run. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @orval/core package is a tool designed for generating TypeScript clients from OpenAPI specifications. It streamlines the process of API integration by automating client code generation, thus enhancing developer productivity. However, a critical vulnerability has been identified that exposes users to potential code injection attacks, compromising the security of applications utilizing this package.

Vulnerability Detail

The vulnerability arises from the inadequate sanitization of user inputs in the x-enum-descriptions field within OpenAPI specifications. Specifically, the jsStringEscape function fails to properly handle certain characters, such as '*' and '/', allowing attackers to inject arbitrary JavaScript code. This can lead to severe consequences, including unauthorized access to system resources and execution of malicious commands. The vulnerability has been assigned a CVSS score of 9.3, indicating its critical nature.

How To Fix

Latest published version: 8.44.0 as of 23 Oct 2026

npm install @orval/core@8.44.0

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 7.19.0, < 7.21.0 7.21.0
    npm install @orval/core@7.21.0
  • >= 8.0.0, < 8.2.0 8.2.0
    npm install @orval/core@8.2.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, users can avoid using the x-enum-descriptions field in their OpenAPI specifications until they can update to the patched version. This reduces the attack surface and minimizes the risk of code injection.

Conclusion

The @orval/core package has a critical vulnerability that allows for code injection through unsanitized inputs. Users are strongly advised to update to the latest patched versions to secure their applications. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.

See every vulnerability recorded for @orval/core →

Share this vulnerability

FAQ

The vulnerability is a code injection flaw that allows attackers to inject arbitrary JavaScript code through unsanitized inputs.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without requiring any signup.

Exploitation of this vulnerability can lead to unauthorized access, execution of malicious commands, and potential compromise of sensitive data.

Yes, the vulnerability has been patched in versions 7.21.0 and 8.2.0 of the @orval/core package.

If immediate updates are not possible, refrain from using the x-enum-descriptions field in your OpenAPI specifications as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for @orval/core.

How To Fix

Latest published version: 8.44.0 as of 23 Oct 2026

npm install @orval/core@8.44.0

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 7.19.0, < 7.21.0 7.21.0
    npm install @orval/core@7.21.0
  • >= 8.0.0, < 8.2.0 8.2.0
    npm install @orval/core@8.2.0

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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