{"id":"CVE-2026-71868","state":"PUBLISHED","title":"Orval: Import-time RCE via enum-typed default -> zod module-level template literal","description":"Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a ${...} expression or backtick in an enum default is emitted into a module-level template literal emitted by zod schema generation without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated zod schema module is imported, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/zod/src/index.ts function formatDefaultValue. This issue is fixed in version 8.21.0.","publishedAt":"2026-08-19T17:37:34.092Z","updatedAt":"2026-08-21T19:43:39.471Z","severity":{"score":9.3,"label":"Critical","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["orval-labs orval"],"affected":[{"vendor":"orval-labs","product":"orval","versions":[{"version":"< 8.21.0","status":"affected"}]}],"references":["https://github.com/orval-labs/orval/security/advisories/GHSA-3575-w9fc-c2j6","https://github.com/orval-labs/orval/pull/3692","https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6","https://github.com/orval-labs/orval/releases/tag/v8.21.0"],"weaknesses":["CWE-94","CWE-1336"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/71xxx/CVE-2026-71868.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-71868","state":"PUBLISHED","datePublished":"2026-08-19T17:37:34.092Z","dateUpdated":"2026-08-21T19:43:39.471Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-08-07T18:26:53.524Z"},"containers":{"cna":{"title":"Orval: Import-time RCE via enum-typed default -> zod module-level template literal","descriptions":[{"lang":"en","value":"Orval generates type-safe JavaScript clients in TypeScript from OpenAPI v3 and Swagger v2 specifications. Prior to 8.21.0, a ${...} expression or backtick in an enum default is emitted into a module-level template literal emitted by zod schema generation without safe encoding. This permits attacker-controlled JavaScript to be evaluated when the generated zod schema module is imported, resulting in code execution in the developer, CI, test, or application environment. The affected code is packages/zod/src/index.ts function formatDefaultValue. This issue is fixed in version 8.21.0."}],"affected":[{"vendor":"orval-labs","product":"orval","versions":[{"version":"< 8.21.0","status":"affected"}]}],"references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-3575-w9fc-c2j6","name":"https://github.com/orval-labs/orval/security/advisories/GHSA-3575-w9fc-c2j6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/orval-labs/orval/pull/3692","name":"https://github.com/orval-labs/orval/pull/3692","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6","name":"https://github.com/orval-labs/orval/commit/8ef1bfdf3f9bcaf9dabfbe2e42887f1c0e159ab6","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v8.21.0","name":"https://github.com/orval-labs/orval/releases/tag/v8.21.0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":9.3,"baseSeverity":"CRITICAL","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","lang":"en","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-19T17:37:34.092Z"},"source":{"advisory":"GHSA-3575-w9fc-c2j6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-3575-w9fc-c2j6","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-21T19:43:10.477229Z","id":"CVE-2026-71868","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-21T19:43:39.471Z"}}]}}}