{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-54662","id":"CVE-2026-54662","title":"swagger-typescript-api vulnerable to code injection via unescaped `servers[0].url` in fetch http-client template","description":"swagger-typescript-api generates API clients for Fetch or Axios from OpenAPI specifications. Prior to 13.12.2, src/code-gen-process.ts createApiConfig copies servers[0].url into apiConfig.baseUrl, and templates/base/http-clients/fetch-http-client.ejs interpolates apiConfig.baseUrl into the generated HttpClient baseUrl field without escaping, allowing an attacker-controlled OpenAPI spec to inject T","descriptionLong":"swagger-typescript-api generates API clients for Fetch or Axios from OpenAPI specifications. Prior to 13.12.2, src/code-gen-process.ts createApiConfig copies servers[0].url into apiConfig.baseUrl, and templates/base/http-clients/fetch-http-client.ejs interpolates apiConfig.baseUrl into the generated HttpClient baseUrl field without escaping, allowing an attacker-controlled OpenAPI spec to inject TypeScript static field code that executes when the generated fetch client module is imported. This issue is fixed in version 13.12.2.","published":"2026-07-29T14:26:15.992Z","updated":"2026-10-28T02:30:25.672006152Z","reserved":"2026-06-15T20:16:46.199Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["acacode swagger-typescript-api"],"affectedProducts":[{"vendor":"acacode","product":"swagger-typescript-api","defaultStatus":null,"versions":[{"version":"< 13.12.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"swagger-typescript-api","purl":"pkg:npm/swagger-typescript-api","ranges":["<13.12.2"],"fixed":["13.12.2"],"advisory":"GHSA-hqj5-cw9f-rx67"}],"cwes":["CWE-74","CWE-94","CWE-1336"],"aliases":["GHSA-hqj5-cw9f-rx67"],"references":[{"url":"https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-hqj5-cw9f-rx67","tags":["x_refsource_CONFIRM","exploit","advisory","web"]},{"url":"https://github.com/acacode/swagger-typescript-api/pull/1779","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54662.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54662","tags":["advisory"]},{"url":"https://github.com/acacode/swagger-typescript-api","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00347,"epssPercentile":0.28908,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-54662","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54662","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-54662","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-hqj5-cw9f-rx67","ok":true,"note":"GHSA-hqj5-cw9f-rx67"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-54662","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}