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

GHSA-p4cg-3328-rvfg — orval

Fix: orval-labs/orval#3692

GHSA-p4cg-3328-rvfg is a CWE-1336 vulnerability in orval. A fix is available for orval — see the affected versions and patch details below.

Orval: Import-time RCE via query-parameter default -> zod module-level template literal

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

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-p4cg-3328-rvfg.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk+0.13%
Lower risk than most CVEs50th percentile — riskier than 50% of all scored CVEsHighest risk
0.02%0.40%0.78%1.15%0.5%0.7%Sep 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 query-parameter 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: a query parameter 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. maintainer-report.txt make_spec.py reproduce.sh

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-p4cg-3328-rvfg is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Summary Orval's zod schema generation emits the **query-parameter** `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 a
O3 Security · Impact-Aware SCA

Is GHSA-p4cg-3328-rvfg in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-p4cg-3328-rvfg: orval — Fixed in 8.21.0 | O3 Security