CVE-2026-108551 PUBLISHED

openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates

Assigner: VulnCheck
Reserved: 10.10.2026 Published: 10.10.2026 Updated: 10.10.2026

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.

Metrics

CVSS Vector: 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
CVSS Score: 9.3

Product Status

Vendor ferdikoomen
Product openapi-typescript-codegen
Versions Default: unaffected
  • affected from 0 to 0.31.0 (incl.)

Credits

  • George Chen finder

References

Problem Types

  • Improper Control of Generation of Code ('Code Injection') CWE