{"id":"CVE-2026-24132","state":"PUBLISHED","title":"Orval Mock Generation Code Injection via const","description":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions \n7.19.0 and below and 8.0.0-rc.0 through 8.0.2 allow untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript into generated mock files via the const keyword on schema properties. These const values are interpolated into the mock scalar generator (getMockScalar in packages/mock/src/faker/getters/scalar.ts) without proper escaping or type-safe serialization, which results in attacker-controlled code being emitted into both interface definitions and faker/MSW handlers. The vulnerability is similar in impact to the previously reported enum x-enumDescriptions (GHSA-h526-wf6g-67jv), but it affects a different code path in the faker-based mock generator rather than @orval/core. The issue has been fixed in versions 7.20.0 and 8.0.3.","publishedAt":"2026-01-22T23:47:45.846Z","updatedAt":"2026-01-23T20:01:12.356Z","severity":{"score":7.7,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/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":"< 7.20.0","status":"affected"},{"version":">= 8.0.0-rc.0, < 8.0.3","status":"affected"}]}],"references":["https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626","https://github.com/orval-labs/orval/pull/2828","https://github.com/orval-labs/orval/pull/2829","https://github.com/orval-labs/orval/pull/2830","https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5","https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06","https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62","https://github.com/orval-labs/orval/releases/tag/v7.20.0","https://github.com/orval-labs/orval/releases/tag/v8.0.3"],"weaknesses":["CWE-77"],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/24xxx/CVE-2026-24132.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-24132","state":"PUBLISHED","datePublished":"2026-01-22T23:47:45.846Z","dateUpdated":"2026-01-23T20:01:12.356Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-01-21T18:38:22.474Z"},"containers":{"cna":{"title":"Orval Mock Generation Code Injection via const","descriptions":[{"lang":"en","value":"Orval generates type-safe JS clients (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification. Versions \n7.19.0 and below and 8.0.0-rc.0 through 8.0.2 allow untrusted OpenAPI specifications to inject arbitrary TypeScript/JavaScript into generated mock files via the const keyword on schema properties. These const values are interpolated into the mock scalar generator (getMockScalar in packages/mock/src/faker/getters/scalar.ts) without proper escaping or type-safe serialization, which results in attacker-controlled code being emitted into both interface definitions and faker/MSW handlers. The vulnerability is similar in impact to the previously reported enum x-enumDescriptions (GHSA-h526-wf6g-67jv), but it affects a different code path in the faker-based mock generator rather than @orval/core. The issue has been fixed in versions 7.20.0 and 8.0.3."}],"affected":[{"vendor":"orval-labs","product":"orval","versions":[{"version":"< 7.20.0","status":"affected"},{"version":">= 8.0.0-rc.0, < 8.0.3","status":"affected"}]}],"references":[{"url":"https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626","name":"https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/orval-labs/orval/pull/2828","name":"https://github.com/orval-labs/orval/pull/2828","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/pull/2829","name":"https://github.com/orval-labs/orval/pull/2829","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/pull/2830","name":"https://github.com/orval-labs/orval/pull/2830","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5","name":"https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06","name":"https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62","name":"https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v7.20.0","name":"https://github.com/orval-labs/orval/releases/tag/v7.20.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/orval-labs/orval/releases/tag/v8.0.3","name":"https://github.com/orval-labs/orval/releases/tag/v8.0.3","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":7.7,"baseSeverity":"HIGH","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-77","lang":"en","description":"CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-01-22T23:47:45.846Z"},"source":{"advisory":"GHSA-f456-rf33-4626","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-01-23T20:00:52.884919Z","id":"CVE-2026-24132","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-23T20:01:12.356Z"}}]}}}