Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-54662: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in acacode swagger-typescript-api

0
High
VulnerabilityCVE-2026-54662cvecve-2026-54662cwe-74cwe-94cwe-1336
Published: 07/29/2026 (07/29/2026, 14:26:15 UTC)
Source: CVE Database V5
Vendor/Project: acacode
Product: swagger-typescript-api

Description

swagger-typescript-api generates API clients for Fetch or Axios from OpenAPI specifications. Prior to 13.12.2, src/code-gen-process.ts createApiConfig copies servers[0].url into apiConfig.baseUrl, and templates/base/http-clients/fetch-http-client.ejs interpolates apiConfig.baseUrl into the generated HttpClient baseUrl field without escaping, allowing an attacker-controlled OpenAPI spec to inject TypeScript static field code that executes when the generated fetch client module is imported. This issue is fixed in version 13.12.2.

CVSS v3.1

Score 8.3high

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

swagger-typescript-api
pkg:npm/swagger-typescript-api
Affected versions
<13.12.2

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

AILast updated: 07/29/2026, 15:08:57 UTC

Technical Analysis

The swagger-typescript-api package versions before 13.12.2 contain an injection vulnerability (CWE-74) due to improper neutralization of special elements in output used by a downstream component. Specifically, the createApiConfig function copies the first server URL from the OpenAPI spec into apiConfig.baseUrl without escaping, and this value is directly interpolated into the generated TypeScript HttpClient baseUrl field. An attacker controlling the OpenAPI specification can inject arbitrary TypeScript static field code that executes upon module import. This vulnerability is addressed in version 13.12.2.

Potential Impact

Successful exploitation allows an attacker who can supply a malicious OpenAPI specification to inject and execute arbitrary TypeScript code in the generated client module. This can lead to complete compromise of the client environment, including confidentiality, integrity, and availability impacts as indicated by the CVSS score of 8.3 (high severity).

Mitigation Recommendations

Upgrade to swagger-typescript-api version 13.12.2 or later, where this injection vulnerability is fixed. No other official remediation or temporary fixes are documented. Users should avoid generating clients from untrusted OpenAPI specifications until patched.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 6a6a13c09c2644c7f8a6d802

Added to database: 07/29/2026, 14:52:48 UTC

Last enriched: 07/29/2026, 15:08:57 UTC

Last updated: 07/29/2026, 16:22:07 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses