# CVE-2026-54664: swagger-typescript-api vulnerable to code injection via unescaped enum string values

- Severity: High 8.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 20% of CVEs (2026-12-01)
- Published: 2026-07-29T14:32:41.168Z
- Modified: 2026-10-23T23:10:00.157Z
- Also known as: GHSA-5f94-x226-ccpm
- Weaknesses: CWE-74, CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

swagger-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.

(As written by CVE List.)

## Affected

- acacode swagger-typescript-api: < 13.12.2
- swagger-typescript-api (npm): before 13.12.2

## Every score

- GitHub_M: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H`

## References

- <https://github.com/acacode/swagger-typescript-api/security/advisories/GHSA-5f94-x226-ccpm> (web)
- <https://github.com/acacode/swagger-typescript-api/pull/1779> (web)
- <https://github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de> (web)
- <https://github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2> (web)
- <https://github.com/acacode/swagger-typescript-api> (package)

## Sources

- CVE List: [CVE-2026-54664](https://www.cve.org/CVERecord?id=CVE-2026-54664), CVE Terms of Use, modified 2026-07-30
- GitHub Advisory Database: [GHSA-5f94-x226-ccpm](https://github.com/advisories/GHSA-5f94-x226-ccpm), CC-BY-4.0, modified 2026-07-29
- NVD: [CVE-2026-54664](https://nvd.nist.gov/vuln/detail/CVE-2026-54664), Public domain, modified 2026-10-23

---

Page: https://cve.day/CVE-2026-54664 · Whole record: https://cve.day/CVE-2026-54664.json · Rebuilt by cve.day 2026-11-25T22:59:30.441Z
