Vulnerability · Published Oct 10, 2026 · Assigned by VulnCheck
CVE-2026-108551openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates
Critical 9.8
In plain English
A critical-severity code injection in openapi-typescript-codegen from ferdikoomen. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 36% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code.
Official description
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.
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ferdikoomen | openapi-typescript-codegen | 0 – through 0.31.0 |
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- GitHub Issue #2809 issue-tracking
- https://github.com/ferdikoomen/openapi-typescript-codegen product
- https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/exportService.hbs#L89-L110 technical-description
- https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/core/OpenAPI.hbs#L20-L23 technical-description
- VulnCheck Advisory: openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates third-party-advisory