# CVE-2026-108551: openapi-typescript-codegen through 0.31.0 Code Injection via Handlebars Templates

- Severity: Critical 9.3 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 37% of CVEs (2026-12-01)
- Published: 2026-10-10T14:35:05.552Z
- Modified: 2026-10-16T19:21:14.417Z
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- ferdikoomen openapi-typescript-codegen: up to 0.31.0

## Every score

- VulnCheck: CVSS:4.0 9.3 Critical `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`
- VulnCheck: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2809> (issue-tracking)
- <https://github.com/ferdikoomen/openapi-typescript-codegen> (product)
- <https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/exportService.hbs#L89-L110> (technical-description)
- <https://github.com/ferdikoomen/openapi-typescript-codegen/blob/v0.31.0/src/templates/core/OpenAPI.hbs#L20-L23> (technical-description)
- <https://www.vulncheck.com/advisories/openapi-typescript-codegen-through-0.31.0-code-injection-via-handlebars-templates> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-108551](https://www.cve.org/CVERecord?id=CVE-2026-108551), CVE Terms of Use, modified 2026-10-13
- NVD: [CVE-2026-108551](https://nvd.nist.gov/vuln/detail/CVE-2026-108551), Public domain, modified 2026-10-16

---

Page: https://cve.day/CVE-2026-108551 · Whole record: https://cve.day/CVE-2026-108551.json · Rebuilt by cve.day 2026-11-25T22:59:43.418Z
