CVE-2026-108551 Details
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.
A code injection vulnerability has been identified in openapi-typescript-codegen versions through 0.31.0. This vulnerability allows attackers to inject JavaScript into generated TypeScript clients by exploiting unescaped values in an OpenAPI document. The injected code is executed when the generated client is imported or when specific service methods are called. The vulnerability arises from improper handling of OpenAPI specification values, which are interpolated directly into JavaScript string literals without adequate escaping.
Users are advised to migrate to the @hey-api/openapi-ts package, as openapi-typescript-codegen is no longer maintained. The new package addresses this vulnerability. Instructions for migration can be found in the @hey-api/openapi-ts repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 10, 2026CISA-ADP
Assessed Oct 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ferdikoomen openapi-typescript-codegen | <= 0.31.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 13, 2026 | CVE Modified | CISA-ADP |
| Oct 10, 2026 | New CVE Received | [email protected] |
Volerion