Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. swagger-typescript-api
  4. ›
  5. CVE-2026-54664

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

July 29, 2026

swagger-typescript-api interpolates components.schemas.*.enum[i] string values into the body of generated TypeScript enum declarations without escaping. A malicious enum value can close the enclosing string literal, terminate the enum body, and inject a bare-block IIFE that executes at module load the first time the generated client is imported. The trigger requires no instantiation and no method call — only an import of the generated module. The attacker controls the OpenAPI spec (remote --url, third-party / public spec, multi-tenant platform); the victim is whoever runs the generator and imports the result (the developer, their CI runner, or any downstream consumer of the generated package). Impact is arbitrary code execution with the importing process’s privileges — read any file the importer can read, write any file, exfiltrate secrets, etc.

References

  • github.com/acacode/swagger-typescript-api/commit/306d59acb8ffbb00f953f807b97234b21f51d9de
  • github.com/acacode/swagger-typescript-api/pull/1779
  • github.com/acacode/swagger-typescript-api/releases/tag/v13.12.2
  • github.com/acacode/swagger-typescript-api/security/advisories/GHSA-5f94-x226-ccpm
  • github.com/advisories/GHSA-5f94-x226-ccpm
  • nvd.nist.gov/vuln/detail/CVE-2026-54664

Code Behaviors & Features

Detect and mitigate CVE-2026-54664 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 13.12.2

Fixed versions

  • 13.12.2

Solution

Upgrade to version 13.12.2 or above.

Impact 8.3 HIGH

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

Learn more about CVSS

Weakness

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

Source file

npm/swagger-typescript-api/CVE-2026-54664.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:33 +0000.