# CVE-2026-54666: swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies

- Severity: High 8.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-29T14:34:48.668Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-w284-33mx-6g9v
- Weaknesses: CWE-74, CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- acacode swagger-typescript-api: < 13.12.2
- swagger-typescript-api (npm): before 13.12.2

## Every score

- GitHub_M: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`

## References

- <https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-w284-33mx-6g9v> (exploit, web)
- <https://github.com/acacode/swagger-typescript-api/pull/1779> (web)
- <https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de> (web)
- <https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2> (web)
- <https://github.com/acacode/swagger-typescript-api> (package)

## Sources

- CVE List: [CVE-2026-54666](https://www.cve.org/CVERecord?id=CVE-2026-54666), CVE Terms of Use, modified 2026-07-30
- GitHub Advisory Database: [GHSA-w284-33mx-6g9v](https://github.com/advisories/GHSA-w284-33mx-6g9v), CC-BY-4.0, modified 2026-07-29
- NVD: [CVE-2026-54666](https://nvd.nist.gov/vuln/detail/CVE-2026-54666), Public domain, modified 2026-10-23

---

Page: https://cve.day/CVE-2026-54666 · Whole record: https://cve.day/CVE-2026-54666.json · Rebuilt by cve.day 2026-11-25T22:59:30.442Z
