# CVE-2026-25141: Orval has a code injection via unsanitized x-enum-descriptions uing JS comments

> Attackers can execute arbitrary JavaScript in generated clients via JSFuck techniques bypassing sanitization in Orval.

- **Severity:** Critical 9.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Jan 2026
- **Updated:** 2 Feb 2026
- **Also known as:** GHSA-gch2-phqh-fg9q

## What is CVE-2026-25141?

CVE-2026-25141 is a critical code injection vulnerability in orval-labs orval, published on 30 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions starting with 7.19.0 and prior to 7.21.0 and 8.2.0 have an incomplete fix for CVE-2026-23947. While the jsStringEscape function properly handles single quotes ('), double quotes (") and so on, it is still possible to achieve code injection using only a limited set of characters that are currently not escaped. The vulnerability lies in the fact that the application can be forced to execute arbitrary JavaScript using characters such as []()!+. By using a technique known as JSFuck, an attacker can bypass the current sanitization logic and run arbitrary code without needing any alphanumeric characters or quotes. Version 7.21.0 and 8.2.0 contain an updated fix.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2026-25141?

4 open source packages ship an affected version, including @orval/core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@orval/core` | npm | From 7.19.0 | 7.21.0 |
| `@orval/core` | npm | From 7.19.0 | 7.21.0 |
| `@orval/core` | npm | From 8.0.0 | 8.2.0 |
| `@orval/core` | npm | From 8.0.0 | 8.2.0 |

Products: Orval Orval.

## How do I fix CVE-2026-25141?

Upgrade @orval/core to a fixed version for your release line: 7.21.0 or 8.2.0.

## Is CVE-2026-25141 being exploited?

There is no known exploitation of CVE-2026-25141 in the wild and no public exploit code.

## Other vulnerabilities in orval-labs orval

- [CVE-2026-23947](https://insights.sbomify.com/CVE-2026-23947/): Orval MCP client is vulnerable to code injection via unsanitized x-enum-descriptions in enum generation (critical 9.3)
- [CVE-2026-22785](https://insights.sbomify.com/CVE-2026-22785/): orval MCP client is vulnerable to a code injection attack. (critical 9.3)
- [CVE-2026-24132](https://insights.sbomify.com/CVE-2026-24132/): Orval Mock Generation Code Injection via const (high 7.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25141 and fix it if it is affected.

What it is: CVE-2026-25141 is a critical code injection vulnerability in orval-labs orval, published on 30 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-25141 in the wild and no public exploit code.

Affected packages and fixed versions:
- @orval/core (npm): affected from 7.19.0; fixed in 7.21.0
- @orval/core (npm): affected from 7.19.0; fixed in 7.21.0
- @orval/core (npm): affected from 8.0.0; fixed in 8.2.0
- @orval/core (npm): affected from 8.0.0; fixed in 8.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25141/ (Markdown: https://insights.sbomify.com/CVE-2026-25141/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25141
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25141
- OSV: https://osv.dev/vulnerability/CVE-2026-25141

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25141/
Summaries are generated and may contain mistakes; the official description above is the record.
