Skip to content
OpenAdvisories
High · 8.3 CVE-2026-54666 EUVD-2026-50367GHSA-w284-33mx-6g9v

swagger-typescript-api vulnerable to code injection via unescaped OpenAPI path strings in generated method bodies

Published Jul 29, 2026 · Updated Jul 30, 2026 · 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.

Affected products

VendorProductAffectedFixed
acacode swagger-typescript-api < 13.12.2 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm swagger-typescript-api < 13.12.2 13.12.2 GHSA-w284-33mx-6g9v

References