CVE-2026-54661: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in acacode swagger-typescript-api
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.
AI Analysis
Technical Summary
The swagger-typescript-api package generates API clients from OpenAPI specifications. Before version 13.12.2, the template at templates/base/http-clients/axios-http-client.ejs unsafely interpolates the first server URL from the OpenAPI spec into the HttpClient constructor without escaping special characters. This improper neutralization of special elements (CWE-74) enables an attacker who controls the OpenAPI specification to inject and execute arbitrary code during client instantiation. The vulnerability is addressed by fixing the interpolation in version 13.12.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code in the context of the client application when new HttpClient() or new Api() is constructed. This can lead to complete compromise of the client environment, including confidentiality, integrity, and availability impacts as indicated by the CVSS vector (AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).
Mitigation Recommendations
Upgrade to swagger-typescript-api version 13.12.2 or later, where the vulnerability is fixed by properly escaping the server URL during template interpolation. No other official remediation or temporary fixes are documented. Patch status is not explicitly confirmed in the vendor advisory, but the description states the issue is fixed in 13.12.2.
CVE-2026-54661: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in acacode swagger-typescript-api
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 v3.1
Score 8.3high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The swagger-typescript-api package generates API clients from OpenAPI specifications. Before version 13.12.2, the template at templates/base/http-clients/axios-http-client.ejs unsafely interpolates the first server URL from the OpenAPI spec into the HttpClient constructor without escaping special characters. This improper neutralization of special elements (CWE-74) enables an attacker who controls the OpenAPI specification to inject and execute arbitrary code during client instantiation. The vulnerability is addressed by fixing the interpolation in version 13.12.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary code in the context of the client application when new HttpClient() or new Api() is constructed. This can lead to complete compromise of the client environment, including confidentiality, integrity, and availability impacts as indicated by the CVSS vector (AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).
Mitigation Recommendations
Upgrade to swagger-typescript-api version 13.12.2 or later, where the vulnerability is fixed by properly escaping the server URL during template interpolation. No other official remediation or temporary fixes are documented. Patch status is not explicitly confirmed in the vendor advisory, but the description states the issue is fixed in 13.12.2.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T20:16:46.199Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6a13c09c2644c7f8a6d7fc
Added to database: 07/29/2026, 14:52:48 UTC
Last enriched: 07/29/2026, 15:10:12 UTC
Last updated: 07/29/2026, 16:22:07 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.