swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-54666
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 04:42 UTC · Revision 1
Source evidence
swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies
core-osv · Original sourcePublished 29 Jul 2026, 14:34 UTC
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.
osv:CVE-2026-54666
Complete source record
{
"id": "ec4f0f3af87f529d769459587ee515f38eccc5ee0e11b27e6d12980113d856d0",
"url": "https://osv.dev/vulnerability/CVE-2026-54666",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies",
"summary": "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.",
"evidence": "osv:CVE-2026-54666",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-54666",
"aliases": [
"CVE-2026-54666",
"GHSA-w284-33mx-6g9v"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/acacode/swagger-typescript-api",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "cc3e4d1598dfd990b8d862b88cd64ae1ca7653e3"
},
{
"fixed": "306d59acb8ffbb00f953f807b97234b21f51d9de"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "13.12.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "306d59acb8ffbb00f953f807b97234b21f51d9de"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "cc3e4d1598dfd990b8d862b88cd64ae1ca7653e3"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v13.12.2"
}
]
}
}
],
"versions": [
"v13.12.1",
"v13.12.0",
"v13.11.2",
"v13.11.1",
"v13.11.0",
"v13.10.0",
"v13.9.3",
"v13.9.2",
"v13.9.1",
"v13.9.0",
"v13.8.0",
"v13.7.2",
"v13.7.1",
"v13.7.0",
"v13.6.11",
"v13.6.10",
"v13.6.9",
"v13.6.8",
"v13.6.7",
"v13.6.6",
"v13.6.5",
"v13.6.4",
"v13.6.3",
"v13.6.2",
"v13.6.0",
"v13.5.0",
"v13.4.0",
"v13.3.1",
"v13.3.0",
"v13.2.18",
"13.2.17",
"13.2.16",
"13.2.15",
"13.2.14",
"13.2.13",
"13.2.12",
"13.2.11",
"13.2.10",
"13.2.9",
"13.2.8",
"13.2.7",
"13.2.6",
"13.2.5",
"13.2.4",
"13.2.3",
"13.2.2",
"13.2.1",
"13.2.0",
"13.1.3",
"13.1.2",
"13.1.1",
"13.1.0",
"13.0.28",
"13.0.27",
"13.0.26",
"13.0.25",
"13.0.24",
"13.0.22",
"13.0.21",
"13.0.20",
"13.0.19",
"13.0.18",
"13.0.17",
"13.0.16",
"13.0.15",
"13.0.14",
"13.0.13",
"13.0.12",
"13.0.11",
"13.0.10",
"13.0.9",
"13.0.8",
"13.0.7",
"13.0.6",
"13.0.5",
"13.0.4",
"13.0.3",
"13.0.2",
"13.0.1",
"13.0.0",
"12.0.4",
"12.0.3",
"12.0.2",
"12.0.1",
"12.0.0",
"11.1.3",
"11.1.2",
"11.1.1",
"11.1.0",
"11.0.0",
"10.0.3",
"10.0.2",
"9.2.0",
"9.1.2",
"9.1.1",
"9.0.2",
"9.0.1",
"9.0.0",
"8.0.3",
"8.0.2",
"8.0.1",
"8.0.0",
"7.0.1",
"7.0.0",
"6.4.2",
"6.4.1",
"6.4.0",
"6.3.0",
"6.2.1",
"6.2.0",
"6.1.2",
"6.1.1",
"6.1.0",
"6.0.0",
"5.1.7",
"5.1.6",
"5.1.5",
"5.1.4",
"5.1.3",
"5.1.2",
"5.1.1",
"5.1.0",
"5.0.0",
"4.4.0",
"4.3.0",
"4.2.0",
"4.1.0",
"4.0.5",
"4.0.4",
"4.0.3",
"4.0.2",
"4.0.1",
"4.0.0",
"3.1.2",
"3.1.1",
"3.1.0",
"3.0.0",
"2.0.0",
"1.12.0",
"1.11.0",
"1.10.0",
"1.8.4",
"1.8.3",
"1.8.2",
"1.8.1",
"1.8.0",
"1.7.2",
"1.7.0",
"1.6.3",
"1.6.2",
"1.6.1",
"1.6.0",
"1.4.0",
"1.2.6"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54666.json"
}
}
],
"modified": "2026-10-28T02:30:25.668457359Z",
"provider": "osv",
"references": [
"https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54666.json",
"https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-w284-33mx-6g9v",
"https://nvd.nist.gov/vuln/detail/CVE-2026-54666",
"https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de",
"https://github.com/acacode/swagger-typescript-api/pull/1779"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1336",
"CWE-74",
"CWE-94"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54666.json"
}
},
"related_cves": [
{
"value": "CVE-2026-54666",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 492498,
"published_at": "2026-07-29T14:34:48.668+00:00"
}