{"cve":"CVE-2026-54662","nvd":{"published":"2026-07-29T15:16:25.577","modified":"2026-10-23T23:10:00.157","status":"Deferred","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 TypeScript static field code that executes when the generated fetch client module is imported. This issue is fixed in version 13.12.2.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","score":8.3},"cwes":["CWE-74","CWE-94","CWE-1336"],"references":["https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de","https://github.com/acacode/swagger-typescript-api/pull/1779","https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2","https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-hqj5-cw9f-rx67","https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-hqj5-cw9f-rx67"],"products":[],"source":"nvd","synced_at":"2026-10-24T16:53:27.712498749+00:00"},"epss":{"cve":"CVE-2026-54662","score":0.00347,"percentile":0.28034,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-hqj5-cw9f-rx67","url":"https://osv.dev/vulnerability/GHSA-hqj5-cw9f-rx67","summary":"swagger-typescript-api vulnerable to code injection via unescaped `servers[0].url` in fetch http-client template","modified":"2026-08-13T05:15:07.685318539Z","packages":[{"ecosystem":"npm","name":"swagger-typescript-api","purl":"pkg:npm/swagger-typescript-api","ranges":["<13.12.2"],"fixed":["13.12.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}