Skip to main content

CVE-2026-108551: Improper Control of Generation of Code ('Code Injection') in ferdikoomen openapi-typescript-codegen

0
Critical
VulnerabilityCVE-2026-108551cvecve-2026-108551
Published: 10/10/2026 (10/10/2026, 14:35:05 UTC)
Source: CVE Database V5
Vendor/Project: ferdikoomen
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

ferdikoomen

openapi-typescript-codegen

Affected versions
>=0 <=0.31.0
openapi-typescript-codegen
pkg:npm/openapi-typescript-codegen
Affected versions
<=0.31.0

Run 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

AILast updated: 10/10/2026, 15:03:15 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses