CVE-2026-54666
swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
Description
swagger-typescript-api generates API clients for Fetch or Axios from an OpenAPI Specification. Prior to 13.12.2, src/schema-routes/schema-routes.ts passes OpenAPI path keys through parseRouteName to templates/default/procedure-call.ejs and templates/modular/procedure-call.ejs without escaping JavaScript template literal interpolation, allowing an attacker-controlled path containing ${...} to execute when the generated method is called. This issue is fixed in version 13.12.2.
Public exploit
A reference of the record is tagged as an exploit or proof of concept: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 44 days later
· 44 days later
Published
- 1 day later
· 1 day later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High8.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVDNVD · Deferred | 3.1 | High8.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.36% · top 70% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 8.3.
Weakness
- CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (opens in a new tab)All about CWE-74 and its CVEs
- CWE-94: Improper Control of Generation of Code ('Code Injection') (opens in a new tab)All about CWE-94 and its CVEs
- CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (opens in a new tab)All about CWE-1336 and its CVEs
Affected products
acacode · swagger-typescript-api
- affected < 13.12.2
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmswagger-typescript-apiGHSA-w284-33mx-6g9v (opens in a new tab)
References (4)
- https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-w284-33mx-6g9v (opens in a new tab)x_refsource_CONFIRMexploit
- https://github.com/acacode/swagger-typescript-api/pull/1779 (opens in a new tab)x_refsource_MISC
- https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de (opens in a new tab)x_refsource_MISC
- https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-w284-33mx-6g9v (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-54666)Record last updated .