CVE-2026-54666
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.
Description as published by the source, in English.
Key facts
- Published
- 2026-07-29
- Last modified
- 2026-10-23
- Assigned by
- security-advisories@github.com
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H- Scored by
- security-advisories@github.com
- Probability of exploitation
-
0.3 %
higher than 21 %
of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Not registered in the sources
Weakness type
-
CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or ot…
-
CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could …
-
CWE-94: Improper Control of Generation of Code
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or b…
Attack techniques
Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.
- T1027: Obfuscated Files or Information
- T1027.006: HTML Smuggling
- T1027.009: Embedded Payloads
- T1564.009: Resource Forking
- T1574.006: Dynamic Linker Hijacking
- T1574.007: Path Interception by PATH Environment Variable
References
- https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b2…
- 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-w284-33mx-6g9v
- https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-w284-33mx-6g9v
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.