CVE Catalog

CVE-2026-54666

HighCVSS 8.3
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.29%

21th percentile - higher than 21% of all known CVEs

Summary

A code injection vulnerability in swagger-typescript-api (prior to 13.12.2) occurs during API client generation. The parseRouteName function passes OpenAPI path keys to templates without proper escaping of JavaScript template literal interpolation, allowing an attacker to inject ${...} code in the path that executes when the generated method is called.

Risk Assessment

An attacker controlling the OpenAPI spec can inject malicious JavaScript code that executes in the context of the generated API client, leading to application security compromise.

Recommendation

Update swagger-typescript-api to version 13.12.2, which includes the fix for escaping interpolation in templates.

Other vulnerabilities in swagger-typescript-api

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS