{"id":"CVE-2026-62680","aliases":["CVE-2026-62680","GHSA-cxq5-97v7-87j8"],"related":[],"kind":"vulnerability","state":"published","title":"Orval: Generation-time SSRF + remote/local file inclusion via unrestricted $ref","summary":"Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.22.0, Orval resolves remote and local external $ref values without an allowlist or confinement to the input directory. Processing an attacker-controlled OpenAPI description can cause requests from the developer or CI host to attacker-selected or internal HTTP services, read absolute or out-of-tree local files, and inline untrusted remote schemas into generated clients. The affected code is packages/orval/src/import-specs.ts external reference loading. This issue is fixed in version 8.22.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.22.0, Orval resolves remote and local external $ref values without an allowlist or confinement to the input directory. Processing an attacker-controlled OpenAPI description can cause requests from the developer or CI host to attacker-selected or internal HTTP services, read absolute or out-of-tree local files, and inline untrusted remote schemas into generated clients. The affected code is packages/orval/src/import-specs.ts external reference loading. This issue is fixed in version 8.22.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nOrval resolves OpenAPI `$ref`s by fetching remote `http(s)` URLs and reading local files (including\nabsolute / out-of-tree paths), inlining the referenced schema into the generated client. Running\n`orval` on a spec whose `$ref` points at an attacker/internal URL or an arbitrary local file yields\nSSRF, remote file inclusion, and local file inclusion. Verified on 8.19.0. This is a different class\nfrom Orval's published output-injection CVEs (CVE-2026-22785/23947/24132/25141), none of which covers\nthe `$ref` resolver.\n\n### Details\n\n- `$ref: http://attacker/internal-evil.json#/...` → build host fetches (SSRF) and inlines the remote\n  schema (RFI); confirmed property `REMOTE_ORVAL_PROP` in the generated client.\n- `$ref: /abs/path.json#/...` or `../../secret.json#/...` → out-of-tree local file read + inlined (LFI).\n\nNo RCE: on 8.19.0 the description JSDoc is escaped (`*/`->`*\\/`, the published fix), so `$ref` content\ncannot break out into code. The chain stops at SSRF + RFI + LFI.\n\nFix: don't resolve remote `$ref`s by default (opt-in + host allowlist); confine local `$ref`\nresolution to the input directory tree (reject absolute paths and `../` escapes).\n\n### PoC\n\n`reproduce.sh` attached: confirms LFI (out-of-tree read), SSRF (listener hit), RFI (remote schema\ninlined). Verified on Orval 8.19.0.\n\n### Impact\n\nBuild-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).","format":"markdown","source":"ghsa"}],"published":"2026-08-19T17:42:11.227Z","modified":"2026-09-09T21:20:38.860Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"}],"cwes":["CWE-22","CWE-829","CWE-918"],"affected":[{"ranges":[{"version":"< 8.22.0","status":"affected"}],"vendor":"orval-labs","product":"orval","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.22.0"}],"ecosystem":"npm","package":"orval","purl":"pkg:npm/orval","source":"ghsa"}],"references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-cxq5-97v7-87j8","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/orval-labs/orval/pull/3723","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/orval-labs/orval/commit/23786c056f4eba38c02bf2968677988dbbe4de10","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v8.22.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62680","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/orval-labs/orval/pull/3692","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/orval-labs/orval","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-19T18:06:42.406Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-62680","url":"https://www.cve.org/CVERecord?id=CVE-2026-62680","licence":"CVE Terms of Use","modified":"2026-08-19T18:06:47.948Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cxq5-97v7-87j8","url":"https://github.com/advisories/GHSA-cxq5-97v7-87j8","licence":"CC-BY-4.0","modified":"2026-09-02T15:00:08.972Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-62680","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62680","licence":"Public domain","modified":"2026-09-09T21:20:38.860Z"}],"updatedAt":"2026-11-25T22:59:33.991Z","epss":{"score":0.00372,"percentile":0.33172,"date":"2026-12-01T12:00:22.000Z"}}