Read the docs

Code injection in openapi-typescript-codegen via OpenAPI documents

Priority MEDIUM 48CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
None
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
No fix listed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.

Summary

openapi-typescript-codegen through 0.31.0 does not escape values taken from an OpenAPI document when it interpolates them into single-quoted string literals in generated code, which is CWE-94 code injection. An attacker who controls an OpenAPI document can embed a single quote in path keys, parameter names, servers[0].url or info.version to run arbitrary JavaScript when generated clients are imported or service methods are called.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00415 36th percentileScored 2026-11-07
Fix No fix listed No fixed version in the sources yet

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
ferdikoomenopenapi-typescript-codegenup to 0.31.0—No fix listedCNA
  • openapi-typescript-codegen Vendorferdikoomen Affected up to 0.31.0 Fixed in — No fix listed CNA

Remediation

The sources list no fixed version for openapi-typescript-codegen.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Timeline

  1. 2026-10-11 Threatist record created from CVE-2026-108551
  2. 2026-10-11 Alias added: GHSA-3pr5-x7xf-mg4g
  3. 2026-10-13 CISA SSVC decision points changed

References

Sources