CVE-2026-108551: Improper Control of Generation of Code ('Code Injection') in ferdikoomen openapi-typescript-codegen
Description
openapi-typescript-codegen versions up to 0.31.0 contain a critical code injection vulnerability. This flaw allows attackers who can control an OpenAPI document to inject arbitrary JavaScript code by supplying unescaped values within single-quoted string literals. The injection points include path keys, parameter names, servers[0].url, or info.version fields. Exploitation occurs when generated clients are imported or service methods are called, leading to arbitrary code execution.
CVSS v4.0
Score 9.3critical
Affected software
ferdikoomen
openapi-typescript-codegen
pkg:npm/openapi-typescript-codegenRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-108551 is a critical code injection vulnerability in the openapi-typescript-codegen project (versions up to and including 0.31.0). The vulnerability arises because the tool interpolates unescaped user-controlled values into single-quoted JavaScript string literals when generating client code from OpenAPI documents. Attackers controlling the OpenAPI specification can embed single quotes in specific fields such as path keys, parameter names, servers[0].url, or info.version, enabling arbitrary JavaScript execution upon client import or method invocation.
Potential Impact
Successful exploitation allows remote attackers with control over an OpenAPI document to execute arbitrary JavaScript code in the context of the generated client. This can lead to full compromise of the client environment, including unauthorized actions and data access. The CVSS 4.0 score is 9.3 (critical), reflecting the high impact and ease of exploitation without authentication or user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using untrusted OpenAPI documents with openapi-typescript-codegen or sanitize inputs to prevent injection. Monitor the vendor's channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-10-10T14:24:43.582Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aca50642cdf04f656337b67
Added to database: 10/10/2026, 14:49:08 UTC
Last enriched: 10/10/2026, 15:03:15 UTC
Last updated: 10/10/2026, 15:08:10 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.