Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

GHSA-3575-w9fc-c2j6 — orval

Fix: orval-labs/orval#3692

GHSA-3575-w9fc-c2j6 is a Code Injection vulnerability in orval. A fix is available for orval — see the affected versions and patch details below.

Orval: Import-time RCE via enum-typed default -> zod module-level template literal

Also known asCVE-2026-71868
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs49th percentile — riskier than 49% of all scored CVEsHighest risk
0.00%0.38%0.77%1.15%0.5%0.7%0.7%Sep 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

29other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
orvalnpm
2.9Mdownloads / week

Description

Summary

Orval's zod schema generation emits the enum-typed default value as a module-level template literal (export const …Default = <default>;) without escaping ${ or the backtick. A default of the form v${<code>}w injects a live JavaScript expression evaluated when the generated zod schema module is imported, executing attacker-controlled code at import — no request or function call needed. Verified on Orval 8.19.0; survives default OpenAPI validation.

Details

export const …Default = `v${globalThis.ORVPWN()}w`;   // ${...} = arbitrary JS expression, runs at import

Malicious input: an enum-typed property with a default of v${<attacker JS>}w. ${...} permits any JS expression.

Note: this is one of several default-bearing positions that reach the same unescaped zod template-literal sink; a single fix (escape default values) closes all of them, and a CNA may choose to consolidate the related reports.

PoC

reproduce.sh (+ make_spec.py) attached: generates the zod schema with default validation, bundles it, imports it, and shows a marker written at import. Verified on 8.19.0.

Impact

Code execution at import in any application that imports a zod schema module generated from an attacker-controlled or attacker-influenced OpenAPI description.

Suggested fix

Emit default values via a proper string-literal encoder (JSON.stringify, or escape backtick and ${ if a template literal must be used); never interpolate a spec value into a template literal. Apply to every default position.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmorvalall versions8.21.0npm install orval@8.21.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for orval, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update orval to 8.21.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-3575-w9fc-c2j6 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

### Summary Orval's zod schema generation emits the **enum-typed** `default` value as a module-level template literal (`export const …Default = `<default>`;`) without escaping `${` or the backtick. A default of the form `v${<code>}w` injects a live JavaScript expression evaluated when the generated zod schema module is imported, executing attacker-controlled code at import — no request or function call needed. Verified on Orval 8.19.0; survives default OpenAPI validation. ### Details ```ts export const …Default = `v${globalThis.ORVPWN()}w`; // ${...} = arbitrary JS expression, runs at imp
O3 Security · Impact-Aware SCA

Is GHSA-3575-w9fc-c2j6 in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-3575-w9fc-c2j6: orval — Fixed in 8.21.0 | O3 Security