{"id":"CVE-2026-54666","published":"2026-07-29T14:34:48Z","modified":"2026-07-30T13:47:57Z","title":"swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies","vendor":"acacode","product":"swagger-typescript-api","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00359,"percentile":0.30488,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"},{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-w284-33mx-6g9v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/acacode/swagger-typescript-api/pull/1779","tags":["x_refsource_MISC"]},{"url":"https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de","tags":["x_refsource_MISC"]},{"url":"https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2","tags":["x_refsource_MISC"]}],"priority":{"score":11.9,"factors":[{"name":"EPSS percentile","points":6.1},{"name":"CVSS severity","points":5.81}]},"vendorSlug":"acacode","affectedVersions":[{"vendor":"acacode","product":"swagger-typescript-api","versions":["< 13.12.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-07-30T13:46:17.119632Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"swagger-typescript-api","vulnerableRanges":["<13.12.2"],"patched":["13.12.2"],"from":["GHSA-w284-33mx-6g9v"],"provenance":"source"}],"summary":{"text":"The swagger-typescript-api tool from acacode, prior to 13.12.2, fails to escape OpenAPI path keys before they are interpolated into template literals in its generated method bodies (via src/schema-routes/schema-routes.ts and the default and modular procedure-call templates). An attacker who can supply an OpenAPI specification containing a path with a ${...} expression can have that expression executed when the generated client method is called, and exploitation requires user interaction, meaning the victim must invoke the affected generated method.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:49:47Z"},"euvd":{"id":"EUVD-2026-50367","exploited":false,"provenance":"source"}}