CVE-2026-71871
Received Received - Intake

Orval JavaScript Client Template Injection via Header Defaults

Vulnerability report for CVE-2026-71871, 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 a header parameter 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-116 The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
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-71871 is a critical Remote Code Execution (RCE) vulnerability in the Orval npm package affecting versions 8.19.0 and below. It occurs during Zod schema generation where header-parameter default values are emitted as module-level template literals without proper escaping. Attackers can inject malicious JavaScript via default values formatted as v${<attacker-controlled code>}w, which executes automatically when the generated schema module is imported.

Detection Guidance

To detect this vulnerability, check if your system uses Orval versions 8.19.0 or below. Run 'npm list orval' or 'yarn list orval' to verify the installed version. If the version is 8.19.0 or lower, the system is vulnerable.

Impact Analysis

This vulnerability allows attackers to execute arbitrary JavaScript code in your environment when you import a generated Zod schema module. This could lead to full system compromise, data theft, or further network infiltration. It affects developers, CI/CD pipelines, test environments, and applications importing the vulnerable schema.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially causing data breaches that violate GDPR (data protection) and HIPAA (health information privacy). Organizations using vulnerable versions may face compliance violations, regulatory fines, and reputational damage due to compromised systems handling sensitive data.

Mitigation Strategies

Upgrade Orval to version 8.21.0 or higher immediately using 'npm install orval@latest' or 'yarn upgrade orval@latest'. Review any generated Zod schema modules for suspicious default values containing ${...} or backticks. Avoid using template literals or unsafe expressions in OpenAPI default values.

Chat Assistant

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

EPSS Chart