CVE-2026-54666: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in acacode swagger-typescript-api
swagger-typescript-api versions prior to 13.12.2 contain a vulnerability where OpenAPI path keys are passed into JavaScript template literals without proper escaping. This allows attacker-controlled input containing ${...} expressions to be executed when the generated API client method is called. The issue is fixed in version 13.12.2.
AI Analysis
Technical Summary
The vulnerability in swagger-typescript-api arises from improper neutralization of special elements in output used by downstream components. Specifically, in versions before 13.12.2, the source file src/schema-routes/schema-routes.ts passes OpenAPI path keys through parseRouteName into EJS templates (templates/default/procedure-call.ejs and templates/modular/procedure-call.ejs) without escaping JavaScript template literal interpolation. This enables an attacker to craft path keys containing JavaScript template expressions (${...}) that execute when the generated API client method is invoked. This is a code injection vulnerability fixed in version 13.12.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript code in the context of the generated API client, potentially leading to complete compromise of client-side operations, data leakage, or further attacks. The CVSS score of 8.3 reflects high impact on confidentiality, integrity, and availability, requiring user interaction but no privileges.
Mitigation Recommendations
Upgrade swagger-typescript-api to version 13.12.2 or later, where this vulnerability is fixed by properly escaping JavaScript template literal interpolation in the affected templates. No other mitigation or workaround is documented. Patch status is not explicitly stated but the fix is included in version 13.12.2.
CVE-2026-54666: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in acacode swagger-typescript-api
Description
swagger-typescript-api versions prior to 13.12.2 contain a vulnerability where OpenAPI path keys are passed into JavaScript template literals without proper escaping. This allows attacker-controlled input containing ${...} expressions to be executed when the generated API client method is called. The 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 vulnerability in swagger-typescript-api arises from improper neutralization of special elements in output used by downstream components. Specifically, in versions before 13.12.2, the source file src/schema-routes/schema-routes.ts passes OpenAPI path keys through parseRouteName into EJS templates (templates/default/procedure-call.ejs and templates/modular/procedure-call.ejs) without escaping JavaScript template literal interpolation. This enables an attacker to craft path keys containing JavaScript template expressions (${...}) that execute when the generated API client method is invoked. This is a code injection vulnerability fixed in version 13.12.2.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript code in the context of the generated API client, potentially leading to complete compromise of client-side operations, data leakage, or further attacks. The CVSS score of 8.3 reflects high impact on confidentiality, integrity, and availability, requiring user interaction but no privileges.
Mitigation Recommendations
Upgrade swagger-typescript-api to version 13.12.2 or later, where this vulnerability is fixed by properly escaping JavaScript template literal interpolation in the affected templates. No other mitigation or workaround is documented. Patch status is not explicitly stated but the fix is included in version 13.12.2.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T22:53:58.560Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a6a13c09c2644c7f8a6d814
Added to database: 07/29/2026, 14:52:48 UTC
Last enriched: 07/29/2026, 15:08:25 UTC
Last updated: 07/29/2026, 17:33:30 UTC
Views: 7
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.