External risk intelligence

Orval Code Generation Vulnerability Allows Code Execution.

CVE advisorySeverity: CRITICAL (CVSS 9.3)

CVE-2026-72717

This vulnerability exists within Orval, a development-time tool used to generate client code from API specifications. It operates in developer environments, CI/CD pipelines, or build processes, not as a runtime service or public-facing network application.

Code Injection

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A security issue in Orval, a tool for generating code from API specifications, allows for code execution if malicious input is included in schema defaults during the code generation process. This could impact development, testing, and application environments by allowing unauthorized code to run.

  • Malicious code could execute during code generation.
  • Matters if using Orval for API client code.
  • Confirm Orval usage and code generation process.

Attack Path

How an attacker could exploit the issue

An attacker could inject specially crafted input into an OpenAPI or Swagger API specification. When the Orval tool processes this specification to generate type-safe JavaScript clients, it may include this input directly into generated code. If the generated code is then imported and executed in a development, build, or testing environment, the attacker's input could be evaluated, leading to code execution.

  • Malicious API specification provided.
  • Code generation and subsequent import.
  • Code execution in developer environments.

Live Threat

Current exploitation, exposure, and threat context

When Orval, a tool for generating type-safe JavaScript clients, processes an OpenAPI or Swagger specification, a specially crafted default value in a schema could lead to code execution within the developer's environment, CI/CD pipeline, or application. This occurs because the default value is not safely encoded when used in a module-level template literal generated by Zod.

  • Developer or CI/CD environment code.
  • Malicious input in schema default values.
  • Unintended code execution during development.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability in Orval affects the code generation process, specifically when handling default values in schema definitions. Responsibility likely lies with development teams or platform engineers who manage the API specification tooling and CI/CD pipelines. The first practical step is to identify all instances where Orval is used in code generation, confirm if the affected versions are present, and assess the risk based on where the generated code is deployed and if it handles untrusted input.

  • Identify teams using Orval for code generation.
  • Verify Orval usage and versions in CI/CD.
  • Plan updates to the affected code generation.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is Orval and how is it used?

Orval is a software development tool that automates the creation of type-safe JavaScript or TypeScript API clients. It takes structured API definitions, such as OpenAPI v3 or Swagger v2 specifications, and generates the necessary boilerplate code. Developers use it to ensure their front-end or service code remains synchronized with API changes, streamlining the integration process by producing consistent, reliable communication layers for their applications.

What is the code execution flaw in CVE-2026-72717?

This vulnerability involves improper neutralization of special elements, classified under CWE-94, CWE-116, and CWE-1336. When Orval generates Zod schemas, it fails to safely encode specific characters in schema default values. Because these values are placed into module-level template literals, an attacker can embed malicious JavaScript. When the generated code is subsequently imported, the system unintentionally executes this injected code.

How does an attacker trigger this vulnerability?

The trigger requires the presence of a malicious payload within the default value field of an API specification file. Orval must then process this compromised specification to generate client code. Simply having the library installed is insufficient; the bug is only activated when the flawed template literal is created and subsequently imported into an environment, such as a local developer machine or a build server.

Is my environment at risk from this Orval issue?

Halo Surface Signal indicates that this issue is unlikely to impact standard public-facing network services directly. Because the vulnerability exists in a build-time tool, the risk is concentrated in your development workflows, CI/CD pipelines, and local environments where API clients are generated. If you are not using Orval to build code from external or untrusted API specifications, your risk profile is significantly lower.

What steps should I take if I use Orval?

Begin by auditing your development projects to identify where Orval is implemented. Check your version numbers and upgrade to version 8.21.0 or higher, which includes the necessary encoding fixes. Additionally, review the trust level of the API specification files being processed; ensure they originate from known, secure sources to prevent the injection of malicious schema defaults into your codebase during the generation process.

References