CVE-2026-62680: Orval: Generation-time SSRF + remote/local file inclusion via unrestricted $ref
Summary Orval resolves OpenAPI $refs by fetching remote http(s) URLs and reading local files (including absolute / out-of-tree paths), inlining the referenced schema into the generated client. Running orval on a spec whose $ref points at an attacker/internal URL or an arbitrary local file yields SSRF, remote file inclusion, and local file inclusion. Verified on 8.19.0.
Published Sep 2, 2026
Affected packages
orval
- Ecosystem
- npm
- Affected
- < 8.22.0
- Fixed in
- 8.22.0
- Check
npm ls orval
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Orval resolves OpenAPI $refs by fetching remote http(s) URLs and reading local files (including absolute / out-of-tree paths), inlining the referenced schema into the generated client. Running orval on a spec whose $ref points at an attacker/internal URL or an arbitrary local file yields SSRF, remote file inclusion, and local file inclusion. Verified on 8.19.0. This is a different class from Orval's published output-injection CVEs (CVE-2026-22785/23947/24132/25141), none of which covers the $ref resolver.
Details
$ref: http://attacker/internal-evil.json#/...→ build host fetches (SSRF) and inlines the remote schema (RFI); confirmed propertyREMOTE_ORVAL_PROPin the generated client.$ref: /abs/path.json#/...or../../secret.json#/...→ out-of-tree local file read + inlined (LFI).
No RCE: on 8.19.0 the description JSDoc is escaped (*/->*\/, the published fix), so $ref content cannot break out into code. The chain stops at SSRF + RFI + LFI.
Fix: don't resolve remote $refs by default (opt-in + host allowlist); confine local $ref resolution to the input directory tree (reject absolute paths and ../ escapes).
PoC
reproduce.sh attached: confirms LFI (out-of-tree read), SSRF (listener hit), RFI (remote schema inlined). Verified on Orval 8.19.0.
Impact
Build-time SSRF from the developer or CI host, disclosure of arbitrary local files, and inclusion of untrusted remote content, from running the generator on an attacker-controlled or attacker-influenced OpenAPI description. No code execution (output escaping is in place post the earlier fixes).
Credited to Gal3m, mrostamipoor, aqeelat.
References
- https://github.com/orval-labs/orval/security/advisories/GHSA-cxq5-97v7-87j8
- https://nvd.nist.gov/vuln/detail/CVE-2026-62680
- https://github.com/orval-labs/orval/pull/3692
- https://github.com/orval-labs/orval/pull/3723
- https://github.com/orval-labs/orval/commit/23786c056f4eba38c02bf2968677988dbbe4de10
- https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6
- https://github.com/orval-labs/orval/releases/tag/v8.22.0
- https://github.com/advisories/GHSA-cxq5-97v7-87j8
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-62681
Orval: RCE via OpenAPI path -> unescaped request-URL template literal (backtick breakout)
critical9.3Sep 3, 2026CVE-2026-62682
Orval: RCE via servers[].url -> unescaped request-URL template literal (with getBaseUrlFromSpecification)
critical9.3Sep 3, 2026CVE-2026-71864
Orval: Import-time RCE via header parameter name -> computed-property-key injection in the zod client
critical9.3Sep 3, 2026CVE-2026-71865
Orval: Import-time RCE via query parameter name -> computed-property-key injection in the zod cli
critical9.3Sep 3, 2026CVE-2026-71867
Orval: RCE via schema property name -> computed-property-key injection in the MSW mock generator
critical9.3Sep 3, 2026CVE-2026-71868
Orval: Import-time RCE via enum-typed default -> zod module-level template literal
critical9.3Sep 3, 2026
