Code Injection in orval (CVE-2026-71871)
Summary
Code injection in orval (CVE-2026-71871). Risk of unauthorized operations or information disclosure. Exploitable via default. Mitigation: upgrade to 8.21.0 or later.
Original description
The description as published by the source.
Summary
Orval's zod schema generation emits the header-parameter default value as a module-level template literal (export const Default = ``;) without escaping ${ or the backtick. A default of the form v${}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 header parameter with a default of v${}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 lite…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2026-71871 has been found in orval.
Attackers can target a specific entry point like default over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade orval to 8.21.0 or later.
If unsure, ask your IT team or search "orval CVE-2026-71871" on the vendor's site.
CVE-2026-71871 (orval) — CWE-94
Attack surface: default / reproduce.sh / make_spec.py
Patched: 8.21.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in orval. Attackers reach the vulnerable code path via default.
Check the vendor advisory for the affected versions of orval. Attack surface: default / reproduce.sh / make_spec.py.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 8.21.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'orval' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'orval' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
orvalを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade orval to 8.21.0ステージング環境で 8.21.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com