{"id":"CVE-2026-108551","published":"2026-10-10T14:35:05Z","modified":"2026-10-13T18:27:49Z","title":"openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates","vendor":"ferdikoomen","product":"openapi-typescript-codegen","tier":"tail","description":{"text":"openapi-typescript-codegen through 0.31.0 contains a code injection vulnerability that allows attackers controlling an OpenAPI document to inject JavaScript by supplying unescaped values interpolated into single-quoted string literals. Attackers can embed a single quote in path keys, parameter names, servers[0].url, or info.version to execute arbitrary JavaScript when generated clients are imported or service methods called.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00726,"percentile":0.50007,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809","tags":["issue-tracking"]},{"url":"https://github.com/ferdikoomen/openapi-typescript-codegen","tags":["product"]},{"url":"https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/exportService.hbs#L89-L110","tags":["technical-description"]},{"url":"https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/core/OpenAPI.hbs#L20-L23","tags":["technical-description"]},{"url":"https://www.vulncheck.com/advisories/openapi-typescript-codegen-through-0.31.0-code-injection-via-handlebars-templates","tags":["third-party-advisory"]}],"priority":{"score":21.9,"factors":[{"name":"EPSS percentile","points":10.0},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.86}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-10-23","earliestUrl":"https://github.com/Zombie-Kaiser/CVE-2026-108551-POC","repos":[{"name":"Zombie-Kaiser/CVE-2026-108551-POC","url":"https://github.com/Zombie-Kaiser/CVE-2026-108551-POC","stars":1,"created":"2026-10-23"}]},"first":{"date":"2026-10-23","source":"PoC-in-GitHub","url":"https://github.com/Zombie-Kaiser/CVE-2026-108551-POC"},"provenance":"source"},"vendorSlug":"ferdikoomen","affectedVersions":[{"vendor":"ferdikoomen","product":"openapi-typescript-codegen","versions":["<= 0.31.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-10-13T18:27:39.102462Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-96346","exploited":false,"provenance":"source"}}