Skip to main content

Orval CVE-2026-71867

| EUVDEUVD-2026-62607 CRITICAL
SQL Injection (CWE-89)
2026-08-19 GitHub_M GHSA-2w86-xfrc-g85r
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious OpenAPI spec with quoted property name
  2. Delivery
    Victim runs Orval MSW codegen
  3. Exploit
    Single quote breaks generated object key
  4. Execution
    Injected JS written into mock factory
  5. Persist
    Test or MSW handler calls factory
  6. Impact
    Arbitrary code execution in dev/CI environment

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires (1) the victim to run Orval versions before 8.21.0 against an attacker-influenced OpenAPI v3 / Swagger v2 spec, (2) the spec to contain a schema property name that is not a valid ES5 identifier and includes a single quote (the exact injection vector, e.g. x':[require('fs').execSync('id'),), and (3) the MSW mock-generation feature to be enabled so getKey emits the tainted single-quoted key, followed by the generated mock factory actually being invoked by a test run or MSW handler. Limiting factors: exploitation is not against a running network service - it depends on developer/CI action (generating code and executing the mocks), and organizations that only process their own trusted specs are effectively not exposed. Despite the CVSS UI:N/PR:N rating, in practice a human/CI build step is what triggers execution.

Impact

The vendor CVSS 4.0 score of 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) reflects worst-case unauthenticated remote code execution, but the realistic risk is more nuanced and the UI:N and PR:N metrics deserve scrutiny. Exploitation is not a live network attack against a running service; it requires a victim to feed Orval a malicious spec and then generate and execute the MSW mocks, so a developer/CI action is effectively required (better modeled as UI:R/UI:A). This is a build-time / developer-tooling supply-chain risk rather than a production-runtime exposure. No EPSS score was provided, the CVE is not in CISA KEV, and no POC is present in the supplied references, so there is no evidence of active or automated exploitation. That said, technical impact is high (arbitrary code execution in trusted dev/CI contexts where secrets and signing keys often live), and the trigger is trivially simple (one quote in a property name), so any organization generating clients from untrusted or third-party OpenAPI specs should treat this as a real priority. For teams that only ever consume their own trusted specs, real-world risk is lower.

Exploit ScenarioDerived

An attacker publishes or contributes an OpenAPI spec (e.g., a shared/third-party API definition) containing a schema property named x':[require('child_process').execSync('id'),. A developer runs Orval to generate the client with MSW mocks, and the malicious quote breaks out of the generated object key; when the mock factory is called during npm test or by an MSW handler, the injected code executes on the developer's workstation or in CI. No public POC is identified, but the single-quote trigger is trivial to reproduce from the advisory description and the added test case.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 19, 2026

Code injection in Orval, a TypeScript/JavaScript API client generator, allows a malicious OpenAPI v3 or Swagger v2 specification to achieve arbitrary code execution in developer, CI, test, or application environments when versions prior to 8.21.0 generate MSW mock factories. The getKey function in packages/core/src/getters/keys.ts wraps non-identifier schema property names in single-quoted object keys without escaping embedded single quotes, so an attacker-controlled property name can break out of the string literal and inject JavaScript that runs when the generated mock factory is invoked by tests or an MSW handler. No public exploit identified at time of analysis, and the issue is not in CISA KEV; a vendor patch (v8.21.0) is available.

RemediationAI

Vendor-released patch: upgrade Orval to version 8.21.0 or later, which routes non-identifier keys through the new jsStringLiteralEscape/jsesc encoder (fix in PR https://github.com/orval-labs/orval/pull/3692, commit 8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6, release https://github.com/orval-labs/orval/releases/tag/v8.21.0, advisory GHSA-2w86-xfrc-g85r). Until you can upgrade, treat OpenAPI/Swagger inputs as untrusted: only run Orval against specs you control or have reviewed, and reject or sanitize specs whose property names contain single quotes or backslashes (and, given the related GHSA-88f2-fpv8-89q2 fix, backticks or ${ sequences in server URLs and paths). As additional compensating controls, disable MSW mock generation if you do not need it (removes the primary sink but forgoes mock coverage), and run codegen plus generated tests inside a sandboxed, network-restricted CI job with least-privilege credentials so that any injected execution cannot reach secrets or production systems (trade-off: added CI complexity). Manually review generated code diffs before committing as a last-line check.

Affected VersionsENISA

orval < 8.21.0

Affected Packages

npm orval fix: 8.21.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Orval is a code-generation tool that reads OpenAPI/Swagger specs and emits type-safe client code, including Mock Service Worker (MSW) mock factories. When a schema property name is not a valid ES5 identifier, getKey emitted it verbatim as '${key}' - a single-quoted JS object key. Because the key content was interpolated without JS string-literal escaping, a property name containing a single quote (e.g. x':[require('fs').execSync('id'),) terminates the intended string and lets the remainder be parsed as executable JavaScript in the generated source file. The root cause is improper neutralization of special elements when building generated code (classic code/eval injection, CWE-94/CWE-95). Note the assigned CWE-89 (SQL Injection) does not match the actual mechanism - this is JavaScript source injection, not SQL. The fix introduces a jsStringLiteralEscape helper (backed by the jsesc library) so quotes and backslashes are safely encoded; the same PR (#3692) also hardened related template-literal injection paths in server URLs and route paths (GHSA-88f2-fpv8-89q2), escaping backticks and ${} interpolation.

Know when Orval gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.3 CRITICAL
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
vuln.today AI 8.8 HIGH

Malicious spec can be remote (AV:N) and trigger is trivial (AC:L, PR:N), but a developer/CI must generate and run the mocks, so UI:R; execution yields full C/I/A impact on that host.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 19, 2026 - 18:03 EUVD
CVE Published
Aug 19, 2026 - 17:38 cve.org
CRITICAL 9.3

DescriptionCVE.org

Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a single quote in a schema property name is emitted into single-quoted object keys in generated MSW mock factories without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated mock factory is called by tests or an MSW handler, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/core/src/getters/keys.ts function getKey and MSW mock generation. This issue is fixed in version 8.21.0.

Executive ViewAI

Why It Matters

Orval API client generator versions before 8.21.0 contain a critical code injection vulnerability that enables arbitrary code execution when processing OpenAPI or Swagger specifications. The vulnerability affects development teams, CI/CD pipelines, and test environments, creating a supply chain risk if malicious specifications are introduced. No public exploit has been identified, but a vendor patch is available.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.5%
Top 61% exploitable
Prevalence
Medium
popular OpenAPI/Swagger client-codegen tool, dev-dependency footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

66
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Orval

View all
CVE-2026-22785 CRITICAL POC
9.8 Jan 12

orval (TypeScript API client generator) before 7.18.0 has code injection via OpenAPI specification summary fields in MCP

CVE-2026-72717 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swag

CVE-2026-72716 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 or Swagger v2 specification execute arbitra

CVE-2026-62681 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker who controls an OpenAPI v3 or Swagger v2 specification embed exec

CVE-2026-62682 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval before 8.21.0 arises when the code generator emits an unescaped backtick (or ${...}) f

CVE-2026-71868 CRITICAL POC
9.3 Aug 19

Code execution in Orval before 8.21.0 occurs when its zod schema generator processes an attacker-controlled OpenAPI v3 o

CVE-2026-71865 CRITICAL POC
9.3 Aug 19

Code injection in Orval before 8.21.0 lets an attacker-controlled OpenAPI v3 / Swagger v2 specification achieve arbitrar

CVE-2026-71869 CRITICAL POC
9.3 Aug 19

Arbitrary code execution in Orval (OpenAPI/Swagger TypeScript client generator) before 8.21.0 lets an attacker who contr

CVE-2026-71864 CRITICAL POC
9.3 Aug 19

Code injection in Orval (orval-labs/orval) before 8.21.0 allows an attacker who controls an OpenAPI v3 or Swagger v2 spe

CVE-2026-71871 CRITICAL POC
9.3 Aug 19

Code injection in Orval, a TypeScript client generator for OpenAPI v3 and Swagger v2 specs, allows arbitrary JavaScript

CVE-2026-71866 CRITICAL POC
9.3 Aug 19

I analyzed the provided intelligence and produced the synthesis below. One thing to flag first: **⚠️ Prompt-injection n

CVE-2026-62680 HIGH POC
7.1 Aug 19

External $ref resolution in Orval prior to version 8.22.0 allows server-side request forgery and path traversal against

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy