CVE-2026-54666
Received Received - Intake

Stored Template Injection in swagger-typescript-api

Vulnerability report for CVE-2026-54666, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-29

Last updated on: 2026-07-29

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-29
Last Modified
2026-07-29
Generated
2026-07-30
AI Q&A
2026-07-30
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Currently, no data is known.

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
CWE-74 The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects swagger-typescript-api versions before 13.12.2. It allows attackers to inject malicious JavaScript code into API client generation by including ${...} in OpenAPI path keys. When the generated API client method is called, the injected code executes, potentially leading to remote code execution or data breaches.

Detection Guidance

Check the version of swagger-typescript-api in your project dependencies. If it is below 13.12.2, the system is vulnerable. Run 'npm list swagger-typescript-api' or 'yarn list swagger-typescript-api' to verify the installed version.

Impact Analysis

If you use a vulnerable version of swagger-typescript-api, attackers could execute arbitrary code on your system when you call generated API methods. This could lead to data theft, system compromise, or further network infiltration. The impact is high as it affects both confidentiality and integrity.

Compliance Impact

This vulnerability could lead to unauthorized data access or modification, violating GDPR's integrity and confidentiality principles and HIPAA's security requirements. Organizations using vulnerable versions may face compliance violations, fines, or legal consequences if exploited.

Mitigation Strategies

Upgrade swagger-typescript-api to version 13.12.2 or later. Update your project dependencies using 'npm update swagger-typescript-api' or 'yarn upgrade swagger-typescript-api'.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-54666. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart