{"id":"CVE-2026-108551","summary":"openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates","details":"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.","modified":"2026-10-12T02:31:12.594400712Z","published":"2026-10-10T14:35:05.552Z","database_specific":{"cna_assigner":"VulnCheck","cwe_ids":["CWE-94"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/108xxx/CVE-2026-108551.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/108xxx/CVE-2026-108551.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-108551"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/openapi-typescript-codegen-through-0.31.0-code-injection-via-handlebars-templates"},{"type":"REPORT","url":"https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809"},{"type":"PACKAGE","url":"https://github.com/ferdikoomen/openapi-typescript-codegen"},{"type":"ARTICLE","url":"https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/core/OpenAPI.hbs#L20-L23"},{"type":"ARTICLE","url":"https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/exportService.hbs#L89-L110"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/ferdikoomen/openapi-typescript-codegen","events":[{"introduced":"0"},{"fixed":"5edfed490d751bc23cfbb58171978d0b232116ca"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"last_affected":"0.31.0"},{"fixed":"0.31.0"}],"source":["AFFECTED_FIELD","DESCRIPTION"]}}],"versions":["v0.30.0","v0.29.0","v0.28.0","v0.27.0","v0.26.0","v0.25.0","v0.24.0","v0.23.0","v0.22.0","v0.21.0","v0.20.1","v0.20.0","v0.19.0","v0.18.2","v0.18.1","v0.18.0","v0.17.0","v0.16.2","v0.16.1","v0.16.0","v0.15.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-108551.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}