CVE-2026-71867
Received Received - Intake

Stored XSS in Orval Mock Factories via Unsafe Schema Property Names

Vulnerability report for CVE-2026-71867, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-19

Last updated on: 2026-08-19

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-19
Last Modified
2026-08-19
Generated
2026-08-19
AI Q&A
2026-08-19
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
orval orval to 8.21.0 (exc)
orval_labs orval 8.21.0
orval_labs orval to 8.20.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-89 The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
CWE-95 The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a Remote Code Execution (RCE) vulnerability in the orval library affecting versions 8.19.0 and below. It occurs when generating MSW mocks with output.mock set to true. Schema property names containing single quotes are emitted as object keys without proper escaping, allowing attackers to inject malicious JavaScript code. When the mock factory runs, the injected code executes, enabling arbitrary file writes or system command execution.

Detection Guidance

Check if your system uses orval versions 8.19.0 or below by inspecting package.json or running npm list orval. Look for generated MSW mock files with single-quoted object keys containing unescaped property names. Review specification files for property names with single quotes.

Impact Analysis

If you use orval to generate mocks and run them, an attacker could craft a malicious OpenAPI specification with a property name containing a single quote. When your code processes this specification, the injected JavaScript could execute, potentially leading to file system access, data theft, or system compromise in your development, CI, or application environment.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially causing data breaches or system compromise. Such incidents may violate GDPR (data protection), HIPAA (health information security), or other compliance requirements, resulting in legal penalties, reputational damage, and loss of trust.

Mitigation Strategies

Upgrade orval to version 8.21.0 or later immediately. Avoid using untrusted OpenAPI/Swagger specification files. If upgrading is not possible, manually escape property names in generated mocks using JSON.stringify before using them.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-71867. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart