CVE-2026-108551 openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates
Attackers can inject JavaScript into generated TypeScript clients via malicious OpenAPI documents, leading to arbitrary code execution when the code is used.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-108551?
CVE-2026-108551 is a critical code injection vulnerability in ferdikoomen openapi-typescript-codegen, published on 10 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-94
Which versions are affected by CVE-2026-108551?
How do I fix CVE-2026-108551?
No fix has been published for CVE-2026-108551 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-108551 being exploited?
There is no known exploitation of CVE-2026-108551 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Sources
Also known as GHSA-3pr5-x7xf-mg4g.