swagger-typescript-api vulnerable to code injection via unescaped enum string values

Summary

CVECVE-2026-54664
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-29 15:16:25 UTC
Updated2026-07-30 19:23:45 UTC
Descriptionswagger-typescript-api generates API clients for Fetch or Axios from an OpenAPI Specification. Prior to 13.12.2, src/schema-parser/base-schema-parsers/enum.ts passes components.schemas.*.enum[i] values to Ts.StringValue in src/configuration.ts without escaping before templates/base/enum-data-contract.ejs renders TypeScript enum declarations, allowing an attacker-controlled OpenAPI spec to inject code that executes when the generated module is imported. This issue is fixed in version 13.12.2.

Risk And Classification

Primary CVSS: v3.1 8.3 HIGH from [email protected]

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

EPSS: 0.002700000 probability, percentile 0.190680000 (date 2026-08-01)

Problem Types: CWE-74 | CWE-94 | CWE-1336 | CWE-74 CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection') | CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary8.3HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
3.1CNADECLARED8.3HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

CVSS v3.1 Breakdown

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

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Acacode Swagger-typescript-api affected < 13.12.2 Not specified

References

ReferenceSourceLinkTags
github.com/acacode/swagger-typescript-api/pull/1779 [email protected] github.com
github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2 [email protected] github.com
github.com/acacode/swagger-typescript-api/security/advisories/GHSA-5f94-... [email protected] github.com
github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f80... [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report