


Perceptive Security
SOC/SIEM Consultancy

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 OpenA…
Published:
28 juli 2026 om 22:00:00
Alert date:
29 juli 2026 om 16:02:53
Source:
nvd.nist.gov
Supply Chain & Dependencies, Web Technologies
A code injection vulnerability exists in swagger-typescript-api prior to version 13.12.2. The library, which generates API clients for Fetch or Axios from OpenAPI Specifications, fails to escape JavaScript template literal interpolation when processing OpenAPI path keys. Specifically, src/schema-routes/schema-routes.ts passes path keys through parseRouteName to EJS templates without sanitization. An attacker-controlled OpenAPI path containing ${...} expressions can achieve arbitrary code execution when the generated API method is invoked. This represents a supply chain risk as the malicious payload is embedded at code generation time and triggers at runtime. The vulnerability is fixed in version 13.12.2 of swagger-typescript-api.
Technical details
Mitigation steps:
Affected products:
swagger-typescript-api
Related links:
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
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
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
