CVE-2026-71868
Received Received - Intake

Code Execution via Unsafe Enum Default in Orval

Vulnerability report for CVE-2026-71868, 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 ${...} expression or backtick in an enum default is emitted into a module-level template literal emitted by zod schema generation without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated zod schema module is imported, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/zod/src/index.ts function formatDefaultValue. 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 8.21.0
orval-labs orval to 8.21.0 (exc)
orval-labs orval 8.21.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-71868 is a critical Remote Code Execution (RCE) vulnerability in the Orval library affecting versions 8.19.0 and below. It occurs when generating Zod schemas from OpenAPI specifications. Malicious JavaScript expressions in enum default values are emitted as module-level template literals without proper escaping. When the generated schema module is imported, the injected code executes immediately, enabling arbitrary code execution at import time.

Detection Guidance

Check if your Orval version is below 8.21.0 by running npm list orval or checking package.json. Inspect generated Zod schema files for template literals containing ${...} or backticks in enum defaults. Look for unexpected JavaScript execution during module imports.

Impact Analysis

This vulnerability allows attackers to execute arbitrary code in your environment when you import a Zod schema module generated from an OpenAPI description. This could compromise your developer, CI, test, or application environments. The attack requires no additional requests or function calls, making it highly dangerous.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially resulting in data breaches, loss of confidentiality, integrity, and availability. Such incidents may violate GDPR, HIPAA, and other regulations, leading to legal penalties, reputational damage, and loss of compliance certifications.

Mitigation Strategies

Upgrade Orval to version 8.21.0 or later immediately. Review and regenerate all Zod schemas from OpenAPI specs to ensure defaults are properly escaped. Audit dependencies for any generated schemas that may have been compromised.

Chat Assistant

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

EPSS Chart