CVE-2026-54660: swagger-typescript-api vulnerable to authorization-token exfiltration via spec `$ref`
When the developer supplies an --authorizationToken (commonly required to fetch a private spec behind authentication), swagger-typescript-api attaches that token to the Authorization header of every subsequent HTTP request it makes while resolving external $ref URLs in the spec — with no same-origin check, no host allowlist, and no scope-down for cross-origin requests. A malicious OpenAPI spec containing a $ref to an attacker-controlled URL therefore causes the developer’s bearer token to be sent verbatim to that URL during code generation.
The threat model is identical to the SSRF advisory filed alongside this one (companion finding), but with credential disclosure as the primary impact. The token is typically a high-value secret: a GitHub PAT, an OAuth bearer for the API the spec describes, an enterprise SSO token, an AWS-style API key, or similar. Disclosure to an attacker-controlled URL is one curl-equivalent away from full takeover of whatever scope the token grants.
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-h754-fxp7-88wx
- github.com/advisories/GHSA-h754-fxp7-88wx
- nvd.nist.gov/vuln/detail/CVE-2026-54660
Code Behaviors & Features
Detect and mitigate CVE-2026-54660 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 →