Code injection in openapi-typescript-codegen via OpenAPI documents
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ferdikoomen | openapi-typescript-codegen | up to 0.31.0 | — | No fix listed | CNA |
- 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
- 2026-10-11 Threatist record created from CVE-2026-108551
- 2026-10-11 Alias added: GHSA-3pr5-x7xf-mg4g
- 2026-10-13 CISA SSVC decision points changed
References
Other 4
Sources
- CVE-2026-108551 · CVE Program
- CVE-2026-108551 · NVD
- FIRST EPSS
- GHSA-3pr5-x7xf-mg4g · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences