Skip to main content
← All vulnerabilities
CVE-2026-54666GHSA-W284-33MX-6G9V

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 13.12.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • acacode swagger-typescript-api

    fixed in 13.12.2

  • swagger-typescript-apinpm

    fixed in 13.12.2

References 4

GitHub · acacode/swagger-typescript-api