CVE-2026-54661
Deferred Deferred - Pending Action

Remote Code Execution in swagger-typescript-api via OpenAPI Spec Injection

Vulnerability report for CVE-2026-54661, 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, 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-29
Last Modified
2026-07-29
Generated
2026-08-19
AI Q&A
2026-07-30
EPSS Evaluated
2026-08-18
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
swagger_typescript_api swagger_typescript_api 13.12.2

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 an attacker to inject malicious code into an OpenAPI specification file. When the API client is generated, the injected code executes during the construction of HttpClient or Api objects due to improper escaping of the servers[0].url field.

Detection Guidance

Check if your system uses swagger-typescript-api versions prior to 13.12.2. Inspect OpenAPI specs for untrusted sources. Review generated API clients for suspicious code injection in HttpClient or Api constructors.

Impact Analysis

If you use a vulnerable version of swagger-typescript-api and process an attacker-controlled OpenAPI spec, the injected code could execute arbitrary commands on your system. This could lead to data theft, unauthorized access, or system compromise when new HttpClient or Api instances are created.

Compliance Impact

This vulnerability could lead to unauthorized data access or exfiltration, violating GDPR's data protection requirements and HIPAA's safeguards for protected health information. Organizations using vulnerable versions may face compliance violations, legal penalties, and reputational damage.

Mitigation Strategies

Upgrade swagger-typescript-api to version 13.12.2 or later. Avoid using untrusted OpenAPI specifications. Regenerate API clients from trusted specs.

Chat Assistant

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

EPSS Chart