Skip to main content
← All vulnerabilities
CVE-2026-54661GHSA-38C3-WV3C-V3XJ

swagger-typescript-api vulnerable to code injection via unescaped `servers[0].url` in axios http-client template

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 13.12.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • 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, templates/base/http-clients/axios-http-client.ejs interpolates servers[0].url from src/code-gen-process.ts into the HttpClient constructor without escaping, allowing an attacker-controlled OpenAPI spec to inject code that executes when new HttpClient() or new Api() is constructed. This issue is fixed in version 13.12.2.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · 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