CVE-2026-108551
Received Received - Intake

Code Injection in openapi-typescript-codegen

Vulnerability report for CVE-2026-108551, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-10

Last updated on: 2026-10-10

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-10
Last Modified
2026-10-10
Generated
2026-10-10
AI Q&A
2026-10-10
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ferdikoomen openapi-typescript-codegen 0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a code injection flaw in openapi-typescript-codegen through version 0.31.0. Attackers controlling an OpenAPI document can inject JavaScript by inserting unescaped values into single-quoted string literals. This is done by embedding single quotes in fields like path keys, parameter names, servers[0].url, or info.version. When generated clients are imported or service methods are called, the injected JavaScript executes, posing a significant security risk.

Detection Guidance

Check if openapi-typescript-codegen version 0.31.0 or earlier is installed using npm list openapi-typescript-codegen. Inspect OpenAPI specifications for single quotes in path keys, parameter names, servers[0].url, or info.version fields. Review generated client code for unescaped interpolations in files like exportService.hbs or OpenAPI.hbs.

Impact Analysis

This vulnerability allows attackers to execute arbitrary JavaScript in the context of applications using the generated client. It can lead to remote code execution either per method call (via path or parameters) or at import time (via server URL or API version). Any environment generating or running a client from an untrusted OpenAPI spec could be compromised.

Compliance Impact

This vulnerability could lead to unauthorized code execution in applications using generated clients, potentially violating data protection requirements under GDPR (e.g., unauthorized access to personal data) and HIPAA (e.g., exposure of protected health information).

Mitigation Strategies

Upgrade to a patched version of openapi-typescript-codegen or migrate to @hey-api/openapi-ts. Avoid using untrusted OpenAPI specifications. Sanitize all input fields in OpenAPI specs before processing. Monitor for suspicious activity in generated client code or network requests.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-108551. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart