CVE Catalog

CVE-2026-108551

CriticalCVSS 9.8
Published: Translated: NVD NIST

Summary

Code injection vulnerability in openapi-typescript-codegen up to version 0.31.0. An attacker controlling an OpenAPI document can inject JavaScript by supplying unescaped values interpolated into single-quoted string literals. This can be exploited by embedding a single quote in path keys, parameter names, servers[0].url, or info.version.

Risk Assessment

An attacker could execute arbitrary JavaScript when generated clients are imported or service methods are called, potentially leading to application takeover or data theft.

Recommendation

Update openapi-typescript-codegen to a version above 0.31.0 if available. If not, avoid using untrusted OpenAPI documents and manually review generated code.

Related vulnerabilities

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS