---
id: CVE-2026-108551
title: >-
  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
summary: >-
  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. A…
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-94
vendor: ferdikoomen
product: openapi-typescript-codegen
affected:
  - openapi-typescript-codegen <= 0.31.0
published: '2026-10-10'
updated: '2026-10-16'
sourceUpdated: '2026-10-16T19:21:14.417'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-108551'
references:
  - url: 'https://github.com/ferdikoomen/openapi-typescript-codegen'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/core/OpenAPI.hbs#L20-L23
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/exportService.hbs#L89-L110
    label: disclosure@vulncheck.com
  - url: 'https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/openapi-typescript-codegen-through-0.31.0-code-injection-via-handlebars-templates
    label: disclosure@vulncheck.com
tags:
  - nvd
  - exploit-available
  - cve.org
epss: 0.00415
epssPercentile: 0.36024
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/Zombie-Kaiser/CVE-2026-108551-POC'
  checkedAt: '2026-11-05T15:30:45.217Z'
exploitAvailable: true
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-10-13T18:27:39.102462Z'
ingestedAt: '2026-10-10T15:25:58.088Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
