PT-2026-50679 · Npm · Swagger-Typescript-Api

CVE-2026-54661

·

Published

2026-06-18

·

Updated

2026-07-29

CVSS v3.1

8.3

High

VectorAV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions swagger-typescript-api versions prior to 13.12.2
Description An issue exists where the software interpolates the servers[0].url value from an OpenAPI specification into the HttpClient constructor of the generated axios client without proper escaping. This occurs within the templates/base/http-clients/axios-http-client.ejs file. An attacker providing a malicious OpenAPI specification can use a specially crafted URL containing a double quote to close the string literal and inject a computed property key containing an Immediately Invoked Function Expression (IIFE). This injected code executes with the privileges of the importing process whenever new HttpClient() or new Api() is instantiated. This can lead to arbitrary code execution, allowing an attacker to read sensitive files, exfiltrate secrets, or spawn child processes.
Recommendations Update swagger-typescript-api to version 13.12.2 or later.

Exploit

Fix

Special Elements Injection

Code Injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-54661
GHSA-38C3-WV3C-V3XJ

Affected Products

Swagger-Typescript-Api