{"id":"CVE-2026-24132","summary":"Orval Mock Generation Code Injection via const","details":"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.","aliases":["GHSA-f456-rf33-4626"],"modified":"2026-08-12T03:51:45.313567292Z","published":"2026-01-22T23:47:45.846Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24132.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-77"]},"references":[{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v7.20.0"},{"type":"WEB","url":"https://github.com/orval-labs/orval/releases/tag/v8.0.3"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/24xxx/CVE-2026-24132.json"},{"type":"ADVISORY","url":"https://github.com/orval-labs/orval/security/advisories/GHSA-f456-rf33-4626"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-24132"},{"type":"FIX","url":"https://github.com/orval-labs/orval/commit/44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5"},{"type":"FIX","url":"https://github.com/orval-labs/orval/commit/6d8ece07ccb80693ad43edabccb3957aceadcd06"},{"type":"FIX","url":"https://github.com/orval-labs/orval/commit/9b211cddc9f009f8a671e4ac5c6cb72cd8646b62"},{"type":"FIX","url":"https://github.com/orval-labs/orval/pull/2828"},{"type":"FIX","url":"https://github.com/orval-labs/orval/pull/2829"},{"type":"FIX","url":"https://github.com/orval-labs/orval/pull/2830"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/orval-labs/orval","events":[{"introduced":"2f61b67fb8addf9dc8106eb398a46c163f6e6b2f"},{"fixed":"b932e804fef8a7dec89f71546fc4e60629bea0cb"},{"introduced":"42232d022a665c00d6d551192cbd14423292372e"},{"fixed":"3db41387cca95012e59c5dd21b709db55b9034be"},{"fixed":"44ca8c1f5f930a3e4cefb6b79b38bcde7f8532a5"},{"fixed":"6d8ece07ccb80693ad43edabccb3957aceadcd06"},{"fixed":"9b211cddc9f009f8a671e4ac5c6cb72cd8646b62"}],"database_specific":{"extracted_events":[{"introduced":"6.0.0"},{"fixed":"7.20.0"},{"introduced":"8.0.0"},{"fixed":"8.0.3"}],"source":["CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:orval:orval:*:*:*:*:*:*:*:*"}}],"versions":["v7.19.0","v7.18.0","v8.0.2","v8.0.1","v8.0.0","v7.17.2","v7.17.0","v7.16.1","v7.16.0","v7.15.0","v7.14.0","v7.13.2","v7.13.1","v7.13.0","v7.12.2","v7.12.1","v7.12.0","v7.11.2","v7.11.1","v7.11.0","v7.10.0","v7.9.0","v7.8.0","v7.7.0","v7.6.0","v7.5.0","v7.4.1","v7.4.0","v7.3.0","v7.2.0","v7.1.1","v7.1.0","v7.0.1","v7.0.0","v6.31.0","v6.30.2","v6.30.1","v6.30.0","v6.29.1","v6.29.0","v6.28.2","v6.28.1","v6.28.0","v6.27.1","v6.27.0","v6.26.0","v6.25.0","v6.24.0","v6.23.0","v6.22.1","v6.22.0","v6.21.0","v6.20.0","v6.19.1","v6.19.0","v6.18.1","v6.18.0","v6.17.0","v6.16.0","v6.15.0","v6.14.4","v6.14.3","v6.14.2","v6.14.1","v6.14.0","v6.13.1","v6.13.0","v6.12.1","v6.12.0","v6.11.1","v6.11.0","v6.10.3","v6.10.2","v6.9.6","v6.9.5","v6.9.4","v6.9.3","v6.9.2","v6.9.1","v6.9.0","v6.8.1","v6.8.0","v6.7.1","v6.7.0","v6.6.4","v6.6.3","v6.6.2","v6.6.1","v6.6.0","v6.5.3","v6.5.2","v6.5.1","v6.5.0","v6.4.3","v6.4.2","v6.4.1","v6.4.0","v6.3.0","v6.2.3","v6.2.2","v6.2.1","v6.2.0","v6.1.2","v6.1.1","v6.1.0","v6.0.4","v6.0.3","v6.0.2","v6.0.1","v6.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-24132.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}